I have a weird problem with flash messages not showing up in IE (tried 8 and 9):
[notice] Your changes have been saved. Next step...
, even when it doesn't appear on the page!Here's my update action:
def update
@form = Forms::Events::EditForm.build_for(@event, params[:event])
if @form.save
redirect_to edit_challenge_path(@form.event, form: @form.event_name), notice: "Your changes have been saved. #{@form.next_form}".html_safe
else
flash.now[:alert] = "Please correct the errors highlighted below."
render "groups/events/edit"
end
end
Any ideas on what could be wrong?
Agreeing with @AnthonyAlberto's comment. What you want is the .now
method of flash, e.g. flash.now[:alert] = ...
Here's a good explanation of the difference.