app/controllers/devise/passwords_controller.rb in devise-3.2.0 vs app/controllers/devise/passwords_controller.rb in devise-3.2.1

- old
+ new

@@ -9,10 +9,11 @@ end # POST /resource/password def create self.resource = resource_class.send_reset_password_instructions(resource_params) + yield resource if block_given? if successfully_sent?(resource) respond_with({}, :location => after_sending_reset_password_instructions_path_for(resource_name)) else respond_with(resource) @@ -26,9 +27,10 @@ end # PUT /resource/password def update self.resource = resource_class.reset_password_by_token(resource_params) + yield resource if block_given? if resource.errors.empty? resource.unlock_access! if unlockable?(resource) flash_message = resource.active_for_authentication? ? :updated : :updated_not_active set_flash_message(:notice, flash_message) if is_flashing_format?