app/models/admin.rb in ants-0.2.5 vs app/models/admin.rb in ants-0.2.6
- old
+ new
@@ -9,11 +9,16 @@
field :permissions, type: Array
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable, :registerable and :omniauthable
- devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable
+ devise :database_authenticatable,
+ :recoverable,
+ :rememberable,
+ :trackable,
+ :validatable,
+ :authentication_keys => [:email]
## Database authenticatable
field :email, type: String, default: ""
field :encrypted_password, type: String, default: ""
@@ -70,11 +75,11 @@
private
def last_sign_in_ago
- if last_sign_in_at
- 'Seen ' + ActionController::Base.helpers.time_ago_in_words(last_sign_in_at) + ' ago'
+ if current_sign_in_at
+ 'Seen ' + ActionController::Base.helpers.time_ago_in_words(current_sign_in_at) + ' ago'
else
'Never seen'
end
end