Class: Firebug::Session
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Firebug::Session
- Defined in:
- lib/firebug/session.rb
Overview
An ActiveRecord model of the CodeIgniter sessions table.
Instance Method Summary collapse
Instance Method Details
#cookie_data ⇒ String
28 29 30 31 |
# File 'lib/firebug/session.rb', line 28 def data = { session_id: session_id, ip_address: ip_address, user_agent: user_agent, last_activity: last_activity } Firebug.(data) end |
#user_agent=(value) ⇒ Object
21 22 23 24 25 |
# File 'lib/firebug/session.rb', line 21 def user_agent=(value) # Pyro seems to truncate the value and since it also uses this value when finding the session, it's important # we do the same. super(Firebug.configuration.truncate_user_agent ? value&.slice(0...120) : value) end |
#user_data ⇒ Object
11 12 13 |
# File 'lib/firebug/session.rb', line 11 def user_data Firebug.unserialize(super || '') end |