Class: Gluttonberg::Public::MemberPasswordResetsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Gluttonberg::Public::MemberPasswordResetsController
- Defined in:
- app/controllers/gluttonberg/public/member_password_resets_controller.rb
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/gluttonberg/public/member_password_resets_controller.rb', line 15 def create @member = Member.find_by_email(params[:gluttonberg_member][:email]) if @member @member.deliver_password_reset_instructions!(current_localization_slug) flash[:notice] = "Instructions to reset your password have been emailed to you. " + "Please check your email." redirect_to root_path else flash[:notice] = "No member was found with that email address" redirect_to root_path end end |
#edit ⇒ Object
28 29 30 31 32 |
# File 'app/controllers/gluttonberg/public/member_password_resets_controller.rb', line 28 def edit respond_to do |format| format.html end end |
#new ⇒ Object
9 10 11 12 13 |
# File 'app/controllers/gluttonberg/public/member_password_resets_controller.rb', line 9 def new respond_to do |format| format.html end end |
#update ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'app/controllers/gluttonberg/public/member_password_resets_controller.rb', line 34 def update @member.password = params[:gluttonberg_member][:password] @member.password_confirmation = params[:gluttonberg_member][:password_confirmation] if @member.save flash[:notice] = "Password successfully updated" redirect_to root_path else render :edit end end |