thingspeak/app/controllers/passwords_controller.rb

17 lines
401 B
Ruby
Raw Permalink Normal View History

2014-03-22 18:21:45 +01:00
class SessionsController < Devise::SessionsController
before_filter :fix_params, :only => :create
# don't modify default devise controllers
def create; super; end
def new; super; end
private
# fixes password reset params so that devise config.reset_password_keys can be set to email for activeadmin
def fix_params
params[:user][:login] = params[:user][:email]
end
end