Eric wrote: >> <%= (link_to "SEND", {:controller => "company", :action => "show", :id >> => current_company.id}) %> > > If a flash is set in that code snippet, I sure can't find it.
Right, thanks Eric. that's why i'm asking the question, because i want to know how to set the flash in the above code snippet, and therefore add to it. Maybe you're right though, i should have put my half-baked attempt at doing so in the example. However, it's pretty clear whatever variable you assign to in a link_to becomes available in the params hash, I don't see how'd you add to the flash hash. Anyways, the temporary, possibly ugly solution, I'm using is to add a param to the link_to, check for the param in the action, and if present, add to the flash. If there is a better way to do it, please let me know. Currently in view: <%= (link_to "VIEW", :controller => "company", :action => "show", :id => current_company.id, :output_flash => "yep") %> in controller, show method: flash[:notice] = "blah blah blah" if params[:output_flash] == "yep" thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---