class method
self.new
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v3.2.22.5Signature
self.new(attributes)
Look for normal and marshaled data, self.find_by_session_id’s way of telling us to postpone unmarshaling until the data is requested. We need to handle a normal data attribute in case of a new record.
Parameters
-
attributesreq
Source
# File activerecord/lib/active_record/session_store.rb, line 221
def initialize(attributes)
@session_id, @data, @marshaled_data = attributes[:session_id], attributes[:data], attributes[:marshaled_data]
@new_record = @marshaled_data.nil?
end
Defined in activerecord/lib/active_record/session_store.rb line 221
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::SessionStore::SqlBypass