thingspeak/app/models/user_session.rb
2014-02-17 12:05:39 -05:00

8 lines
178 B
Ruby

class UserSession < Authlogic::Session::Base
find_by_login_method :find_by_login_or_email
def to_key
new_record? ? nil : [ self.send(self.class.primary_key) ]
end
end