Class: Geri::Admin::PasswordResetsController

Inherits:
Geri::AdminController show all
Defined in:
app/controllers/geri/admin/password_resets_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



11
12
13
14
15
16
17
18
# File 'app/controllers/geri/admin/password_resets_controller.rb', line 11

def create
  @admin_user = AdminUser.find_by(email: params[:password_reset][:email])
  if @admin_user
    @admin_user.deliver_reset_password_instructions!
  end
  flash[:success] = 'If your account was found an email has been sent with instructions to reset your password.'
  redirect_to new_admin_password_reset_url
end

#newObject



7
8
9
# File 'app/controllers/geri/admin/password_resets_controller.rb', line 7

def new
  @password_reset = PasswordReset.new
end