SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Flash messages in RoR

    Hi,
    I was following the Rails 2 book from Sitepoint and I had the code copied 1 to 1 to my development machine, however now the flash[:notice] messages do not appear. They always stay blank? though in the controller they are set.
    Any ideas why they don't show?
    Thanks.

  2. #2
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you get if you put this in the middle of a page?
    Code:
    <&#37;= flash[:notice] %>

  3. #3
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ReggieB View Post
    What do you get if you put this in the middle of a page?
    Code:
    <%= flash[:notice] %>
    absolutely nothing.I even have div tag and when I check the source code the div is of course there, but the flash is not. If I do check with blank? it is true though the controller is setting it?!
    the div and the flash are in application html erb in views layouts

  4. #4
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you post the code from one of your controller methods that should be generating content in flash[:notice] please.

  5. #5
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    I can not submit code because the forum would not let me, because of spam or something I dont have 10 posts yet ?!?!?!?!

    however I think that I was setting somehow wrong path in the redirect, because on one of the controllers worked!
    I will check again


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •