By default, the controllers are coded in a way that you will be
redirected to the SHOW page of the item you are updating.
For example, if I edit a user, after I click the submit button, I will
be redirected to the SHOW page of that users.
Instead of being redirected to the SHOW page, I want to stay in the same
EDIT page with a notice that the user has been updated. How can I
accomplish that?
I tried this...
format.html { redirect_to(:action => 'edit' , :notice => 'User was
successfully updated.') }
And it did get me redirected to the EDIT form. But I don't see the
notice message and the resulting URL is this:
http://localhost:3000/users/4/edit?notice=User+was+successfully+updated.
So I must be doing something wrong.
--
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 [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.