# -*- 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
