Exactly, but you can be a little smarter about it. When you do update_attributes, it's gonna take whatever you pass it. A lot of sites put the "change your password" field on the same page as the other profile stuff but they make it a separate form submit, so the password fields are the only fields sent up.
A different Flash message could be built if you wanted to. Is it necessary? usually not cos they know what they entered. "I saved your stuff" might be enough. If it isn't, you already have the information you need to make a different Flash notice happen - the name of the submit button. By default, it's "commit". Give it a name. If the user clicked it, it will have a value :) If they didn't it won't exist (nil). If you wanted the "change your pw" to be its own page, then yes, you'd use an additional GET method that's not RESTful to do that. However, that's ok. These "present the interface" methods are just fine. That's why you have EDIT and NEW. Where you start becoming unRESTful is when you start doing things like def export_to_csv and def search and def results. (can all be handled by the index action) Does that help? -Brian On Fri, Dec 5, 2008 at 10:20 AM, Agustin Schapira <[EMAIL PROTECTED]> wrote: > >> "Where does the "change password" stuff go? new action called >> "change_password"? No! It's an update! Maybe an additional view to >> show >> the form for requesting the change, but the change itself is an update. >> > > But then wouldn't you need an extra action (GET change_password) to > display that additional view with the form requesting the change? The > form on that view would issue a regular PUT to UPDATE the entire record, > sure, but somehow you need to be able to invoke that form... > > Also, what if you want to display a message saying 'We've changed your > password' instead of the regular 'We've updated your entire record'? > Then you'd need an extra parameter on the PUT account/id action, to > indicate that you've called this action from the 'change_password' form. > Wouldn't you? Or am I missing something? > > Thanks for your help. > > > -- > 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 -~----------~----~----~----~------~----~------~--~---

