On Wed, May 13, 2009 at 10:33 PM, nextpulse <[email protected]> wrote:
>
> I am using a javascript to redirect to another action. Is there a way
> to set the flash [:notice] in the javascript?
>
> So when the javascript redirects, the new action/view picks up the
> flash[:notice]?
>
> (I suspect I may have to do something like url?notice=.....)
>
> ideas?
>
> thanks.

I don't think there is a way but you can use a parameter like
notice=Flash%20message
and then in the receiving action do

flash.now[:notice] = params[:notice] if params[:notice]

Andrew Timberlake
http://ramblingsonrails.com
http://www.linkedin.com/in/andrewtimberlake

"I have never let my schooling interfere with my education" - Mark Twain

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to