Sha256: cdb2b4360f0d121e793698fc9e531909b79af268b3c27ce2e0c73e7bd7197a28
Contents?: true
Size: 848 Bytes
Versions: 42
Compression:
Stored size: 848 Bytes
Contents
module Virgo class Users::PasswordsController < ::Devise::PasswordsController skip_before_filter :require_no_authentication def create self.resource = resource_class.find_by_email(params[:user][:email]) if resource.nil? self.resource = resource_class.new flash.now[:warning] = "No account found matching that email" render "new" and return end resource.send_reset_password_instructions if successfully_sent?(resource) respond_with({}, :location => virgo.after_sending_reset_password_instructions_path_for(resource_name)) else respond_with(resource) end end def resource_params params[:user].present? ? params.require(:user).permit(:email, :login, :password, :password_confirmation, :reset_password_token) : {} end end end
Version data entries
42 entries across 42 versions & 1 rubygems