I am trying to understand why redirect_to only accepts :notice and :alert https://github.com/rails/rails/blob/ead93c5be5b0f1945b7d0302f1aae4685ee3f2fb/actionpack/lib/action_controller/metal/flash.rb#L12 Is there any reason I may be missing to not allow something like :success like this: redirect_to suppliers_path, :success => ''Supplier was successfully created.'' } - Noel -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I believe those two are just the most common. Look at the rest of the code, though. It looks like you can specify other flash values like so: redirect_to suppliers_path, :flash => { :success => ''Supplier was successfully created.'' } -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/ZYIjscA122MJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Wed, Mar 7, 2012 at 10:56 AM, Tim Shaffer <timshaffer-BUHhN+a2lJ4@public.gmane.org> wrote:> I believe those two are just the most common. > > Look at the rest of the code, though. It looks like you can specify other > flash values like so: > > redirect_to suppliers_path, :flash => { :success => ''Supplier was > successfully created.'' } >Thanks Tim, I didn''t get that from the code. When I used redirect_to I was expecting redirect_to suppliers_path, :<whatever> would produce flash[:<whatever>] At least this is a good workaround for me. - Noel -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.