Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix regression on after_commit in nested transactions. | Arthur Neves | 2014-08-15 | 1 | -0/+13 |
| | | | | | | | | | after_commit should not run in nested transactions, however they should run once the outermost transaction gets committed. This patch fixes the problem copying the records from the Savepoint to its parent. So the RealTransaction will have all records that needs to run callbacks on it. [fixes #16425] | ||||
* | Make sure transaction state resets after commit | Arthur Neves | 2014-02-03 | 1 | -0/+15 |
| | | | | [fixes #12566] | ||||
* | Do not set up a variable used only in two tests | Carlos Antonio da Silva | 2014-01-16 | 1 | -15/+18 |
| | | | | | Just create a local variable whenever we need the record, rather than doing an extra find for every test on the setup method. | ||||
* | No need for instance vars on single tests | Carlos Antonio da Silva | 2014-01-16 | 1 | -8/+8 |
| | |||||
* | Cleanup duplicated setup of callbacks in transactions tests | Carlos Antonio da Silva | 2014-01-16 | 1 | -48/+19 |
| | |||||
* | No need to use #send with public methods | Carlos Antonio da Silva | 2014-01-16 | 1 | -10/+10 |
| | |||||
* | Make AR::Base#touch fire the after_commit and after_rollback callbacks | Harry Brundage | 2014-01-16 | 1 | -1/+46 |
| | |||||
* | Don't rewrite AR connection#commit_db_transaction method globally | Akira Matsuda | 2013-07-29 | 1 | -4/+4 |
| | |||||
* | Revert "Merge pull request #6226 from gnufied/master" | Rafael Mendonça França | 2013-04-10 | 1 | -32/+0 |
| | | | | | | | | | | | | | This reverts commit 9bf1a0db4acbbf9e8e6f707250269185224e7efe, reversing changes made to fed97091b9546d369a240d10b184793d49247dd3. Conflicts: activerecord/test/cases/transaction_callbacks_test.rb Reason: This fix introduces another issue described at #8937, so we are reverting it to restore the behavior of 3-2-stable. We will fix both issues when we come out with a better solution | ||||
* | Deprecate #connection in favour of accessing it via the class | Ben Moss | 2013-03-09 | 1 | -4/+4 |
| | | | | | This allows end-users to have a `connection` method on their models without clashing with ActiveRecord internals. | ||||
* | multiple actions for :on option with `after_commit` and `after_rollback` | Yves Senn | 2013-02-21 | 1 | -0/+35 |
| | | | | Closes #988. | ||||
* | Don't call after_commit when creating through an association and save fails, ↵ | James Miller | 2013-02-13 | 1 | -0/+27 |
| | | | | fixes #5802 | ||||
* | validate :on option on after_commit and after_rollback callbacks | Pascal Friederich | 2012-12-26 | 1 | -0/+8 |
| | |||||
* | Remove observers and sweepers | Rafael Mendonça França | 2012-11-28 | 1 | -81/+0 |
| | | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik] | ||||
* | Fix test | Jon Leighton | 2012-09-15 | 1 | -2/+2 |
| | | | | Accidentally checked in commented test code. Fail. >_< | ||||
* | Start to tease out transaction handling into a state machine | Jon Leighton | 2012-09-15 | 1 | -2/+2 |
| | |||||
* | Merge pull request #5535 from markmcspadden/issue_5527_rollbacks | Aaron Patterson | 2012-05-16 | 1 | -0/+37 |
|\ | | | | | Allow manual rollbacks in after_save to reset object correctly | ||||
| * | Allow manual rollbacks in after_save to reset object correctly | Mark McSpadden | 2012-03-21 | 1 | -0/+37 |
| | | |||||
* | | make both cached and record_updated accessors in one line | Hemant Kumar | 2012-05-09 | 1 | -2/+1 |
| | | |||||
* | | after_commit :on => :update should be called when save is | Hemant Kumar | 2012-05-09 | 1 | -0/+7 |
| | | | | | | | | called from after_commit callback | ||||
* | | Fix transaction state not changing when after record gets commited | Hemant Kumar | 2012-05-09 | 1 | -0/+25 |
|/ | |||||
* | Deprecate set_table_name in favour of self.table_name= or defining your own ↵ | Jon Leighton | 2011-11-29 | 1 | -2/+2 |
| | | | | method. | ||||
* | please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT | Aaron Patterson | 2011-06-06 | 1 | -1/+1 |
| | |||||
* | Refactor Active Record test connection setup. Please see the ↵ | Jon Leighton | 2011-06-04 | 1 | -1/+1 |
| | | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases. | ||||
* | fisting after_rollback and after commit callbacks | Aaron Patterson | 2010-08-20 | 1 | -4/+8 |
| | |||||
* | assert_equal here | Santiago Pastorino | 2010-08-16 | 1 | -2/+2 |
| | |||||
* | Added test case to verify that transaction callbacks are correctly ↵ | Tobias Lütke | 2010-08-09 | 1 | -0/+41 |
| | | | | propagated to class observers | ||||
* | removing unused models from tests | Subba Rao Pasupuleti | 2010-07-21 | 1 | -1/+0 |
| | | | | | | [#5153 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Fix bug with rolling back frozen attributes. | Brian Durand | 2010-06-18 | 1 | -3/+11 |
| | | | | | | [#2991] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Revert "Temporarily revert "Update after_commit and after_rollback docs and ↵ | Jeremy Kemper | 2010-06-08 | 1 | -0/+240 |
| | | | | | | | | 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 1b2941cba1165b0721f57524645fe378bee2a950. [#2991] | ||||
* | Temporarily revert "Update after_commit and after_rollback docs and tests to ↵ | Jeremy Kemper | 2010-06-08 | 1 | -240/+0 |
| | | | | | | | | | | | | | | 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 d2a49e4b1f30c5997e169110eed94a55aee53f56 and da840d13da865331297d5287391231b1ed39721b. [#2991] Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/transactions.rb activerecord/test/cases/transaction_callbacks_test.rb | ||||
* | Fixes a test on transaction_callbacks_test.rb | Santiago Pastorino | 2010-05-19 | 1 | -2/+2 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Fixes transaction callbacks tests | Santiago Pastorino | 2010-05-18 | 1 | -23/+19 |
| | | | | | | [#4640 state:committed] Signed-off-by: wycats <wycats@gmail.com> | ||||
* | Use assert_equal correctly in transaction callback tests (exposing some of ↵ | Paco Guzman | 2010-05-17 | 1 | -17/+17 |
| | | | | | | | | them as broken) [#4612] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Update after_commit and after_rollback docs and tests to use new style API ↵ | Brian Durand | 2010-04-29 | 1 | -6/+6 |
| | | | | | | | | with an :on options instead of on_* suffix. [#2991] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Add after_commit and after_rollback callbacks to ActiveRecord that are ↵ | Brian Durand | 2010-04-29 | 1 | -0/+244 |
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> |