Class: PasswordResetsController
Instance Method Summary
collapse
#access_forbidden, #default_title, #find_order, #initialize_extension_partials, #set_title, #title
#admin_created?
included
#included
included
Instance Method Details
9
10
11
12
13
14
15
16
17
18
19
|
# File 'app/controllers/password_resets_controller.rb', line 9
def create
@user = User.find_by_email(params[:email])
if @user
@user.deliver_password_reset_instructions!
flash[:notice] = t("password_reset_instructions_are_mailed")
redirect_to root_url
else
flash[:notice] = t("no_user_found")
render :action => :new
end
end
|
21
22
23
|
# File 'app/controllers/password_resets_controller.rb', line 21
def edit
render
end
|
5
6
7
|
# File 'app/controllers/password_resets_controller.rb', line 5
def new
render
end
|
25
26
27
28
29
30
31
32
33
34
|
# File 'app/controllers/password_resets_controller.rb', line 25
def update
@user.password = params[:user][:password]
@user.password_confirmation = params[:user][:password_confirmation]
if @user.save
flash[:notice] = t("password_updated")
redirect_to account_url
else
render :action => :edit
end
end
|