Forums » General Forum »
users/change_password missing from routes file
Added by Anonymous 208 days ago
I believe this should be added to the routes file
map.connect 'users/change_password', :controller => 'users', :action => 'change_password', :conditions => { :method => :post }
map.resources :users does not cover the change_password action.
Please correct me if I'm wrong.
Replies
RE: users/change_password missing from routes file - Added by Andrew Stone 208 days ago
You are correct in that map.resources :users doesn't cover change_password, but change password is an Ajax call and will not be called directly, so it shouldn't need a route, AFAIK.
Have you experienced problems with this not working? If so, if you use NoScript, have you allowed the site you're testing on?
RE: users/change_password missing from routes file - Added by Anonymous 208 days ago
I have had experienced problems with this not working. After adding the line in the routes file, it works like a charm.
And I am allowing Javascript... if that's what you mean by NoScript... otherwise, what do you mean?
RE: users/change_password missing from routes file - Added by Andrew Stone 208 days ago
It's probably because the template generator doesn't include an application layout which includes the prototype javascript files required to make this call. I was trying to stay away from including a layout and will probably look for a different (non-ajax) method for changing passwords.
RE: users/change_password missing from routes file - Added by Andrew Stone 208 days ago
I've just created an issue to track this:
RE: users/change_password missing from routes file - Added by Anonymous 207 days ago
Just a note: I made changes to the _data partial (the partial containing the change_password Ajax definition) and included the prototype.js file and was still having problems.
RE: users/change_password missing from routes file - Added by Andrew Stone 207 days ago
I'll get this resolved this weekend. Thanks for the update.