class method self.new

Ruby on Rails 3.0.20

Since v2.3.18 Last seen in v3.2.22.5

Available in: v2.3.18 v3.0.20 v3.1.12 v3.2.22.5

Signature

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

attributes req
Source
# File activerecord/lib/active_record/session_store.rb, line 227
      def initialize(attributes)
        @session_id     = attributes[:session_id]
        @data           = attributes[:data]
        @marshaled_data = attributes[:marshaled_data]
        @new_record     = @marshaled_data.nil?
      end

Defined in activerecord/lib/active_record/session_store.rb line 227 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::SessionStore::SqlBypass

Type at least 2 characters to search.

↑↓ navigate · open · esc close