boissier_app/app/controllers/admins/passwords_controller.rb
Nicolas Bally 6abf7679fd initial
2011-05-14 13:36:30 +02:00

18 lines
518 B
Ruby

# -*- encoding : utf-8 -*-
class Admins::PasswordsController < ::Devise::PasswordsController
layout "connexion"
def create
self.resource = resource_class.send_reset_password_instructions(params[resource_name])
if resource.errors.empty?
set_flash_message :notice, :send_instructions
redirect_to new_session_path(resource_name)
else
@flash_i= {}
@flash_i[:alert] = "Aucun compte associé à cette adresse mail n'a été trouvé."
render_with_scope :new
end
end
end