Installed authentication-zero
This commit is contained in:
8
app/models/session.rb
Normal file
8
app/models/session.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class Session < ApplicationRecord
|
||||
belongs_to :user
|
||||
|
||||
before_create do
|
||||
self.user_agent = Current.user_agent
|
||||
self.ip_address = Current.ip_address
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user