Module: Clearance::App::Controllers::PasswordsController::PrivateInstanceMethods
- Defined in:
- lib/clearance/app/controllers/passwords_controller.rb
Instance Method Summary collapse
- #after_create_successful ⇒ Object
-
#custom_validation_for_create(user) ⇒ Object
override this if you want to have additional constraints before sending password reset example: a security question must be answered.
- #failed_create(msg) ⇒ Object
- #find_user_with_reset_password_code_or_deny ⇒ Object
- #url_after_create ⇒ Object
- #url_after_update ⇒ Object
Instance Method Details
#after_create_successful ⇒ Object
65 66 67 |
# File 'lib/clearance/app/controllers/passwords_controller.rb', line 65 def after_create_successful redirect_to url_after_create end |
#custom_validation_for_create(user) ⇒ Object
override this if you want to have additional constraints before sending password reset example: a security question must be answered
71 72 |
# File 'lib/clearance/app/controllers/passwords_controller.rb', line 71 def custom_validation_for_create(user) end |
#failed_create(msg) ⇒ Object
89 90 91 92 |
# File 'lib/clearance/app/controllers/passwords_controller.rb', line 89 def failed_create(msg) flash[:error] = msg render :action => :new end |
#find_user_with_reset_password_code_or_deny ⇒ Object
74 75 76 77 78 79 |
# File 'lib/clearance/app/controllers/passwords_controller.rb', line 74 def find_user_with_reset_password_code_or_deny @user = User.find_by_reset_password_code(params[:id]) if @user.nil? render :nothing => true, :status => :not_found end end |
#url_after_create ⇒ Object
81 82 83 |
# File 'lib/clearance/app/controllers/passwords_controller.rb', line 81 def url_after_create new_session_url end |
#url_after_update ⇒ Object
85 86 87 |
# File 'lib/clearance/app/controllers/passwords_controller.rb', line 85 def url_after_update user_url(@user) end |