method

save

Importance_0
v3.1.0 - Show latest stable - 0 notes - Class: ActiveRecord::SessionStore::SqlBypass
save() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/session_store.rb, line 260
      def save
        return false unless loaded?
        marshaled_data = self.class.marshal(data)
        connect        = connection

        if @new_record
          @new_record = false
          connect.update             INSERT INTO #{table_name} (              #{connect.quote_column_name(session_id_column)},              #{connect.quote_column_name(data_column)} )            VALUES (              #{connect.quote(session_id)},              #{connect.quote(marshaled_data)} ), 'Create session'
        else
          connect.update             UPDATE #{table_name}            SET #{connect.quote_column_name(data_column)}=#{connect.quote(marshaled_data)}            WHERE #{connect.quote_column_name(session_id_column)}=#{connect.quote(session_id)}, 'Update session'
        end
      end
Register or log in to add new notes.