lib/moribus/tracked_behavior.rb
def update_current
      statement = current_to_false_sql_statement

      affected_rows = self.class.connection.update statement

      unless affected_rows == 1
        raise ActiveRecord::StaleObjectError.new(self, "update_current (version #{current_lock_value})")
      end
      true
    end
# Executes SQL UPDATE statement that sets value of 'is_current' attribute to false for a
# record that is subject to update. If the record has locking column, will support
# optimistic locking behavior.
Executes SQL UPDATE statement that sets value of 'is_current' attribute to false for a
record that is subject to update. If the record has locking column, will support
optimistic locking behavior.
Executes SQL UPDATE statement that sets value of ' is_current ' attribute to false for a record that is subject to update . If the record has locking column will support optimistic locking behavior .
def update_current
      statement = current_to_false_sql_statement
      affected_rows = self.class.connection.update statement
      unless affected_rows == 1
        raise ActiveRecord::StaleObjectError.new(self, "update_current (version #{current_lock_value})")
      end
      true
    end
def update_current statement = current_to_false_sql_statement affected_rows = self . class . connection . update statement unless affected_rows == 1 raise ActiveRecord :: StaleObjectError . new ( self , "update_current (version #{current_lock_value})" ) end true end
Executes SQL UPDATE statement that sets value of 'is_current' attribute to false for a
record that is subject to update.
Executes SQL UPDATE statement that sets value of ' is_current ' attribute to false for a record that is subject to update .