Class PasswordResetsController
In: app/controllers/password_resets_controller.rb
Parent: ApplicationController

Methods

create   edit   new   update  

Public Instance methods

[Source]

    # File app/controllers/password_resets_controller.rb, line 31
31:   def create
32:     @user = User.find_by_email(params[:user][:email])
33:     if @user
34:       @user.deliver_password_reset_instructions!
35:       flash[:notice] = t 'c.password_resets.instructions_emailed'
36:       redirect_to_return_url_or_default
37:     else
38:       @user = User.new
39:       flash[:error] = t 'c.password_resets.error_not_found'
40:       render :action => :new
41:     end
42:   end

[Source]

    # File app/controllers/password_resets_controller.rb, line 44
44:   def edit
45:   end

Crud-methods

[Source]

    # File app/controllers/password_resets_controller.rb, line 27
27:   def new
28:     @user = User.new
29:   end

[Source]

    # File app/controllers/password_resets_controller.rb, line 47
47:   def update
48:     @user.password = params[:user][:password]
49:     @user.password_confirmation = params[:user][:password_confirmation]
50:     if @user.save
51:       flash[:notice] = t 'c.password_resets.updated'
52:       redirect_to user_url(@user)
53:     else
54:       render :action => :edit
55:     end
56:   end

[Validate]