views:

22

answers:

1

I followed this password_reset tutorial and was able to get it working. But there are a few things I don't like about it that I want to change.

  1. I'd like it to say password_reset rather than reset_passwords in the url. Which I've managed to accomplish by renaming the controller and routing it in config/routes.rb as map.resources :reset_passwords, :as => 'reset_password', :only => [:index, :create, :edit, :update]

  2. I'd like to have domain.com/password_reset to link to the password_reset page, rather than having domain.com/password_reset/new
    I was able to do this by changing it so that the view with the form where you enter your email is no longer "new" but "index".

  3. I'd like to have it so when the user is emailed with the perishable_token, it gives them a url like domain.com/password_reset/perishable_token or domain.com/verify_password_reset/perishable_token rather than domain.com/password_reset/perishable_token/edit.
    Or at the least I'd like to have it as domain.com/password_reset/perishable_token/verify

I cannot figure out how to get the third one to work.

A: 

I figured out how to change it to domain.com/password_reset/perishable_token rather than domain.com/password_reset/perishable_token/edit. I simply took the code from the Edit view and placed it in the Show view.

Felix Solis