def update_column(name, value)
      name = name.to_s
      raise ActiveRecordError, "#{name} is marked as readonly" if self.class.readonly_attributes.include?(name)
      raise ActiveRecordError, "can not update on a new record object" unless persisted?

      updated_count = self.class.update_all({ name => value }, self.class.primary_key => id)

      raw_write_attribute(name, value)

      updated_count == 1
    end
def update_column(name, value)
      name = name.to_s
      raise ActiveRecordError, "#{name} is marked as readonly" if self.class.readonly_attributes.include?(name)
      raise ActiveRecordError, "can not update on a new record object" unless persisted?

      updated_count = self.class.update_all({ name => value }, self.class.primary_key => id)

      raw_write_attribute(name, value)

      updated_count == 1
    end
Updates a single attribute of an object, without calling save.

 * Validation is skipped.
 * Callbacks are skipped.
 * updated_at/updated_on column is not updated if that column is available.

 Raises an +ActiveRecordError+ when called on new objects, or when the +name+
 attribute is marked as readonly.