Use flash.now[:error] instead of flash[:error] so that the flash will be
displayed immediately. Also, you will need to update the div that
displays your flash since you are not reloading the entire page. This is
easiest using rjs. If you have your flash view code in a partial, a
helper in application_helper.rb like:
#helper to update the flash
def update_flash
page[:flash].replace_html :partial =>
''/shared/flashes''
end
This would allow you to do:
render :update do |page|
page.update_flash
...
end
Hope this helps.
Mindtonic wrote:> Hello,
>
> I am working with remote_form_for.
>
> How do you properly return any error messages generated by the model
> for display in error_message_on?
>
> I can''t seem to find any information about it.
>
> Thanks!
>
>
> >
>
--
Sincerely,
William Pratt
http://www.billpratt.net
billp-YbheRAKfYF4eIZ0/mPfg9Q@public.gmane.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---