class Firebug::Session
An ActiveRecord model of the CodeIgniter sessions table.
Public Instance Methods
user_agent=(value)
click to toggle source
@param [String] value
Calls superclass method
# File lib/firebug/session.rb, line 22 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.config.truncate_user_agent ? value&.slice(0...120) : value) end
user_data()
click to toggle source
@return [Hash, Array]
Calls superclass method
# File lib/firebug/session.rb, line 11 def user_data Firebug.unserialize(super || '') end
user_data=(value)
click to toggle source
@param [Hash] value
Calls superclass method
# File lib/firebug/session.rb, line 16 def user_data=(value) value.transform_values! { |v| v.respond_to?(:public_id) ? v.public_id : v } super(Firebug.serialize(value)) end
Private Instance Methods
timestamp_attributes_for_update()
click to toggle source
Replace the default timestamp column name.
@return [Array<String>]
# File lib/firebug/session.rb, line 39 def timestamp_attributes_for_update ['last_activity'] end