aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/nested_attributes_test.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-10-09 15:37:10 +0100
committerPratik Naik <pratiknaik@gmail.com>2009-10-09 15:47:10 +0100
commite94caf0788df87b139e575f33cdeea12b06f2609 (patch)
treea5ea5d14a5265bf263772921513abf793ae9ded5 /activerecord/test/cases/nested_attributes_test.rb
parent987d501182971c1e6cdf8acb748635d14cf0c341 (diff)
downloadrails-e94caf0788df87b139e575f33cdeea12b06f2609.tar.gz
rails-e94caf0788df87b139e575f33cdeea12b06f2609.tar.bz2
rails-e94caf0788df87b139e575f33cdeea12b06f2609.zip
Store entire options hash in the class var rather than just the reject_if proc for the nested attributes
Diffstat (limited to 'activerecord/test/cases/nested_attributes_test.rb')
-rw-r--r--activerecord/test/cases/nested_attributes_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/nested_attributes_test.rb b/activerecord/test/cases/nested_attributes_test.rb
index e57e361520..2a2a19fd4c 100644
--- a/activerecord/test/cases/nested_attributes_test.rb
+++ b/activerecord/test/cases/nested_attributes_test.rb
@@ -29,13 +29,13 @@ class TestNestedAttributesInGeneral < ActiveRecord::TestCase
Pirate.accepts_nested_attributes_for :ship, :allow_destroy => true, :reject_if => proc { |attributes| attributes.empty? }
end
- def test_base_should_have_an_empty_reject_new_nested_attributes_procs
- assert_equal Hash.new, ActiveRecord::Base.reject_new_nested_attributes_procs
+ def test_base_should_have_an_empty_nested_attributes_options
+ assert_equal Hash.new, ActiveRecord::Base.nested_attributes_options
end
- def test_should_add_a_proc_to_reject_new_nested_attributes_procs
+ def test_should_add_a_proc_to_nested_attributes_options
[:parrots, :birds, :birds_with_reject_all_blank].each do |name|
- assert_instance_of Proc, Pirate.reject_new_nested_attributes_procs[name]
+ assert_instance_of Proc, Pirate.nested_attributes_options[name][:reject_if]
end
end