Flowdock
method

save

Importance_0
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 250
      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} (\n\#{connect.quote_column_name(session_id_column)},\n\#{connect.quote_column_name(data_column)} )\nVALUES (\n\#{connect.quote(session_id)},\n\#{connect.quote(marshaled_data)} )\n", 'Create session'
        else
          connect.update "UPDATE \#{table_name}\nSET \#{connect.quote_column_name(data_column)}=\#{connect.quote(marshaled_data)}\nWHERE \#{connect.quote_column_name(session_id_column)}=\#{connect.quote(session_id)}\n", 'Update session'
        end
      end
Register or log in to add new notes.