Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on May 22, 2012
  1. @chancancode

    Restore the frozen state on rollback. Fixes #6417.

    chancancode authored
    This is a 3-2-stable backport for #6420 which was merged into master.
    
    Currently, when saving a frozen record, an exception would be thrown
    which causes a rollback. However, there is a bug in active record that
    "defrost" the record as a side effect:
    
        >> t = Topic.new
        => #<Topic id: nil, ...>
        >> t.freeze
        => #<Topic id: nil, ...>
        >> t.save
        RuntimeError: can't modify a frozen Hash
        >> t.frozen?
        => false
        >> t.save
        => true
    
    This patch fixes the bug by explictly restoring the frozen state on the
    attributes Hash after every rollback.
Commits on Dec 8, 2011
  1. @vijaydev

    fix nodocs

    vijaydev authored
Commits on Oct 5, 2011
  1. @jonleighton

    Revert "Raise error on unknown primary key."

    jonleighton authored
    This reverts commit ee2be43.
  2. @jonleighton

    Raise error on unknown primary key.

    jonleighton authored
    If we don't have a primary key when we ask for it, it's better to fail
    fast. Fixes GH #2307.
Commits on Jun 1, 2011
  1. @dafaqisdat
  2. @dafaqisdat
Commits on Apr 4, 2011
  1. @miloops @josevalim

    Use IM when trying to load records using ID.

    miloops authored josevalim committed
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Feb 15, 2011
  1. @miloops

    Merge remote branch 'rails/master' into identity_map

    miloops authored
    Conflicts:
    	activerecord/examples/performance.rb
    	activerecord/lib/active_record/association_preload.rb
    	activerecord/lib/active_record/associations.rb
    	activerecord/lib/active_record/associations/association_proxy.rb
    	activerecord/lib/active_record/autosave_association.rb
    	activerecord/lib/active_record/base.rb
    	activerecord/lib/active_record/nested_attributes.rb
    	activerecord/test/cases/relations_test.rb
Commits on Jan 31, 2011
  1. @jfirebaugh @spastorino

    Use run_callbacks; the generated _run_<name>_callbacks method is not …

    jfirebaugh authored spastorino committed
    …a public interface.
    
    Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Commits on Jan 18, 2011
  1. @tenderlove

    remove useless conditional

    tenderlove authored
Commits on Dec 28, 2010
  1. @spastorino
Commits on Dec 20, 2010
  1. @miloops

    Merge remote branch 'rails/master' into identity_map

    miloops authored
    Conflicts:
    	activerecord/lib/active_record/associations/association_proxy.rb
    	activerecord/lib/active_record/autosave_association.rb
    	activerecord/lib/active_record/base.rb
    	activerecord/lib/active_record/persistence.rb
Commits on Dec 10, 2010
  1. @fxn

    reviews commit 53bbbcc

    fxn authored
Commits on Dec 8, 2010
  1. @evtuhovich

    Fix doc about nested transaction rollback

    evtuhovich authored
    Because AR::Rollback do not reraise and inner transaction is not "real"
    nothing rollback at all
Commits on Nov 28, 2010
  1. @josevalim

    Partialy revert f1c13b0

    josevalim authored
Commits on Nov 19, 2010
  1. @miloops
Commits on Nov 9, 2010
  1. @spastorino
  2. @dchelimsky @spastorino

    use persisted? instead of new_record? wherever possible

    dchelimsky authored spastorino committed
    - persisted? is the API defined in ActiveModel
    - makes it easier for extension libraries to conform to ActiveModel APIs
      without concern for whether the extended object is specifically
      ActiveRecord
    
    [#5927 state:committed]
    
    Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Commits on Oct 15, 2010
  1. @carllerche
Commits on Jun 20, 2010
  1. @fxn

    Merge remote branch 'rails/master'

    fxn authored
    Conflicts:
    	actionpack/lib/abstract_controller/base.rb
Commits on Jun 18, 2010
  1. @bdurand @jeremy

    Fix bug with rolling back frozen attributes.

    bdurand authored jeremy committed
    [#2991]
    
    Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Commits on Jun 16, 2010
  1. @rizwanreza
Commits on Jun 8, 2010
  1. @bdurand @jeremy

    Make logic for after_commit and after_rollback :on option work like i…

    bdurand authored jeremy committed
    …t does for validation callbacks.
    
    [#2991 state:committed]
    
    Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  2. @jeremy

    Revert "Temporarily revert "Update after_commit and after_rollback do…

    jeremy authored
    …cs and tests to use new style API with an :on options instead of on_* suffix." and "Add after_commit and after_rollback callbacks to ActiveRecord that are called after transactions either commit or rollback on all records saved or destroyed in the transaction.""
    
    This reverts commit 1b2941c.
    
    [#2991]
  3. @jeremy

    Temporarily revert "Update after_commit and after_rollback docs and t…

    jeremy authored
    …ests to use new style API with an :on options instead of on_* suffix." and "Add after_commit and after_rollback callbacks to ActiveRecord that are called after transactions either commit or rollback on all records saved or destroyed in the transaction."
    
    This reverts commits d2a49e4 and da840d1.
    
    [#2991]
    
    Conflicts:
    
    	activerecord/CHANGELOG
    	activerecord/lib/active_record/transactions.rb
    	activerecord/test/cases/transaction_callbacks_test.rb
Commits on May 8, 2010
  1. @wycats
Commits on May 1, 2010
  1. @fxn
Commits on Apr 30, 2010
  1. @fxn
  2. @bdurand @jeremy

    Update after_commit and after_rollback docs and tests to use new styl…

    bdurand authored jeremy committed
    …e API with an :on options instead of on_* suffix.
    
    [#2991]
    
    Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Commits on Apr 29, 2010
  1. @bdurand @jeremy

    Add after_commit and after_rollback callbacks to ActiveRecord that ar…

    bdurand authored jeremy committed
    …e called after transactions either commit or rollback on all records saved or destroyed in the transaction.
    
    [#2991 state:committed]
    
    Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Commits on Jan 17, 2010
  1. @josevalim
Commits on May 28, 2009
  1. @josh

    Break up DependencyModule's dual function of providing a "depend_on" …

    josh authored
    …DSL and "included" block DSL into separate modules. But, unify both approaches under AS::Concern.
Commits on May 12, 2009
  1. @brynary
Commits on Apr 5, 2009
  1. @lifo

    Merge docrails

    lifo authored
Commits on Feb 22, 2009
  1. @NZKoz

    Revert "Wrap calls to update_attributes in a transaction."

    NZKoz authored
    This caused failures on sqlite, sqlite3 and postgresql
    
    This reverts commit fc09ebc.
    [#922 state:reopened]
Something went wrong with that request. Please try again.