Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Feb 25, 2013
  1. @carlosantoniodasilva

    Merge pull request #9409 from wangjohn/adding_documentation_to_touch

    carlosantoniodasilva committed
    Added documentation to touch throwing an error
  2. @tenderlove

    Merge pull request #9246 from Noemj/update_prepared_statements

    tenderlove committed
    Changed update to use prepared statements
  3. @wangjohn

    Added documentation about how touch now throws an error when one tries

    wangjohn committed
    to use it on an unpersisted object.
  4. @wangjohn

    Raising an ActiveRecordError when one tries to use .touch(name) on a new

    wangjohn committed
    object that has not yet been persisted. This behavior follows the
    precedent set by update_columns.
Commits on Feb 20, 2013
  1. @wangjohn

    Reduced memory leak problem in transactions by lazily updating AR obj…

    wangjohn committed
    …ects with new transaction state. If AR object has a callback, the callback will be performed immediately (non-lazily) so the transaction still has to keep records with callbacks.
Commits on Feb 11, 2013
  1. @olliwer
Commits on Jan 29, 2013
  1. @carlosantoniodasilva
Commits on Jan 18, 2013
  1. @fxn

    iterates the RDoc of update_column(s)

    fxn committed
    This revision makes crystal clear that the methods go
    straight to the database and update the receiver. It
    also adds and example, and removes the duplication
    in the singular and plural forms by referring one to
    the other.
Commits on Jan 3, 2013
  1. Change docs to use update instead of update_attributes

    Amparo Luna + Guillermo Iguaran committed
  2. Rename update_attributes method to update, keep update_attributes as …

    Amparo Luna + Guillermo Iguaran committed
    …an alias
Commits on Dec 7, 2012
  1. @carlosantoniodasilva

    Unscope update_column(s) query to ignore default scope

    carlosantoniodasilva committed
    When applying default_scope to a class with a where clause, using
    update_column(s) could generate a query that would not properly update
    the record due to the where clause from the default_scope being applied
    to the update query.
        class User < ActiveRecord::Base
          default_scope where(active: true)
        user = User.first = false!
        user.update_column(:active, true) # => false
    In this situation we want to skip the default_scope clause and just
    update the record based on the primary key. With this change:
        user.update_column(:active, true) # => true
    Fixes #8436.
Commits on Nov 29, 2012
  1. @jeremy

    Move instantiation responsibilities from Inheritance to Persistence. …

    jeremy committed
    …Have Inheritance#discriminate_class_for_record handle STI lookup duties.
  2. @rafaelfranca

    Remove observers and sweepers

    rafaelfranca committed
    They was extracted from a plugin.
    [Rafael Mendonça França + Steve Klabnik]
Commits on Nov 21, 2012
  1. @rafaelfranca
Commits on Nov 19, 2012
  1. @carlosantoniodasilva
Commits on Nov 17, 2012
  1. @Tho85

    AR::Base.becomes should not change the STI type

    Tho85 committed
    If you want to change the STI type too, use AR::Base.becomes! instead
Commits on Nov 2, 2012
  1. @vijaydev

    Merge branch 'master' of

    vijaydev committed
Commits on Oct 28, 2012
  1. @henrik

    Enable update_column(s) for the primary key attribute.

    henrik committed
    Didn't work before because it updated the model-in-memory first, so the DB query couldn't find the record.
Commits on Oct 23, 2012
  1. @AvnerCohen

    Another batch of hash syntax changes to comment, this time around, I …

    AvnerCohen committed
    …tried to keep 'output' messages untouched.
Commits on Oct 10, 2012
  1. @vijaydev

    copy edits [ci skip]

    vijaydev committed
  2. @AHaymond
Commits on Sep 28, 2012
  1. @jonleighton

    Support for partial inserts.

    jonleighton committed
    When inserting new records, only the fields which have been changed
    from the defaults will actually be included in the INSERT statement.
    The other fields will be populated by the database.
    This is more efficient, and also means that it will be safe to
    remove database columns without getting subsequent errors in running
    app processes (so long as the code in those processes doesn't
    contain any references to the removed column).
Commits on Sep 19, 2012
  1. @guilleiguaran

    Update AR::Base.create and AR:Base#update_attributes docs to remove r…

    guilleiguaran committed
    …eferences to mass assignment options
Commits on Sep 17, 2012
  1. @guilleiguaran
  2. @guilleiguaran
Commits on Sep 3, 2012
  1. @senny

    set the configured #inheritance_column on #become (#7503)

    senny committed with senny
    I had to create a new table because I needed an STI table,
    which does not have both a "type" and a "custom_type"
    the test fails with:
      1) Error:
    NoMethodError: undefined method `type=' for #<Cabbage id: 1, name: "my cucumber", custom_type: "Cucumber">
        /Users/username/Projects/rails/activemodel/lib/active_model/attribute_methods.rb:432:in `method_missing'
        /Users/username/Projects/rails/activerecord/lib/active_record/attribute_methods.rb:100:in `method_missing'
        /Users/username/Projects/rails/activerecord/lib/active_record/persistence.rb:165:in `becomes'
        test/cases/inheritance_test.rb:134:in `test_becomes_works_with_sti'
        test/cases/inheritance_test.rb:140:in `test_alt_becomes_works_with_sti'
Commits on Aug 26, 2012
  1. @rafaelfranca
  2. @rafaelfranca

    Revert "Remove private verify readonly attr method"

    rafaelfranca committed
    This reverts commit 7a8aee0.
  3. @rafaelfranca

    Revert "Remove update_attribute."

    rafaelfranca committed
    This reverts commit a7f4b0a.
Commits on Aug 19, 2012
  1. @carlosantoniodasilva

    Remove private verify readonly attr method

    carlosantoniodasilva committed
    This method was added to be shared between update_attribute and
    update_column in 50725ce, but since
    update_attribute was removed, and update_column has changed to delegate
    to update_columns, the method is not used anywhere anymore.
    Also remove "key.to_s" conversion when raising readonly error, since
    the key is being interpolated.
Commits on Aug 2, 2012
  1. @fxn
Commits on Jul 30, 2012
  1. @rafaelfranca

    Remove the deprecation of update_column.

    rafaelfranca committed
    update_column was suggested as replacement of update_attribute at the
    last release of 3-2-stable, so deprecating it now will confuse the
Commits on Jul 27, 2012
  1. @rafaelfranca

    Revert "Removing composed_of from ActiveRecord."

    rafaelfranca committed
    This reverts commit 14fc8b3.
    Reason: we need to discuss a better path from this removal.
Commits on Jul 24, 2012
  1. @rafaelfranca
  2. @rafaelfranca
Something went wrong with that request. Please try again.