aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/transaction_callbacks_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-04-10 15:18:30 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-04-10 15:21:07 -0300
commit9d2146ac6e4c1fdc9cc157d614b1eb9968ac6a2e (patch)
tree79a4e6576409a5d65662b761ca73ba1792c0ea72 /activerecord/test/cases/transaction_callbacks_test.rb
parent8c883855b40d4ecfb52329ab2de72755be6ad1ba (diff)
downloadrails-9d2146ac6e4c1fdc9cc157d614b1eb9968ac6a2e.tar.gz
rails-9d2146ac6e4c1fdc9cc157d614b1eb9968ac6a2e.tar.bz2
rails-9d2146ac6e4c1fdc9cc157d614b1eb9968ac6a2e.zip
Revert "Merge pull request #6226 from gnufied/master"
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
Diffstat (limited to 'activerecord/test/cases/transaction_callbacks_test.rb')
-rw-r--r--activerecord/test/cases/transaction_callbacks_test.rb32
1 files changed, 0 insertions, 32 deletions
diff --git a/activerecord/test/cases/transaction_callbacks_test.rb b/activerecord/test/cases/transaction_callbacks_test.rb
index 766a5c0c90..9485de88a6 100644
--- a/activerecord/test/cases/transaction_callbacks_test.rb
+++ b/activerecord/test/cases/transaction_callbacks_test.rb
@@ -281,38 +281,6 @@ class TransactionCallbacksTest < ActiveRecord::TestCase
end
end
-
-class SaveFromAfterCommitBlockTest < ActiveRecord::TestCase
- self.use_transactional_fixtures = false
-
- class TopicWithSaveInCallback < ActiveRecord::Base
- self.table_name = :topics
- after_commit :cache_topic, :on => :create
- after_commit :call_update, :on => :update
- attr_accessor :cached, :record_updated
-
- def call_update
- self.record_updated = true
- end
-
- def cache_topic
- unless cached
- self.cached = true
- self.save
- else
- self.cached = false
- end
- end
- end
-
- def test_after_commit_in_save
- topic = TopicWithSaveInCallback.new()
- topic.save
- assert_equal true, topic.cached
- assert_equal true, topic.record_updated
- end
-end
-
class CallbacksOnMultipleActionsTest < ActiveRecord::TestCase
self.use_transactional_fixtures = false