Currently I am on Rails 3.0.3 and I am trying to render a 'new' action in my user controller but when I get an error I get the initial flash on the new user page, but also get a repeat of the flash message when I go to another page.
From the research I've done, you use flash.now[:notice]
for renders but it isn't working. Its not clearing the flash after showing it.
Here is my code:
users_controller.rb
def create
flash.now[:notice] = "flash test."
render :new
end
No comments:
Post a Comment