diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2016-01-25 15:37:07 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2016-01-25 15:37:07 -0800 |
commit | c9d336382a503769b331113ee11d6b09a6f8583b (patch) | |
tree | 48d716c8c279fe63f69f7bb55851762b4fa9e0bf | |
parent | 3b4398bb605cc7b6f475bf76c19aa0702700a199 (diff) | |
parent | 20f943b5e88f2cfea0255a299c301ebafb4430b3 (diff) | |
download | rails-c9d336382a503769b331113ee11d6b09a6f8583b.tar.gz rails-c9d336382a503769b331113ee11d6b09a6f8583b.tar.bz2 rails-c9d336382a503769b331113ee11d6b09a6f8583b.zip |
Merge pull request #23250 from simi/3-2-stable-1-8
Fix 3-2-stable 1.8 compatibility.
-rw-r--r-- | actionpack/lib/action_view/template/resolver.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/nested_attributes_test.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index c6db6685e4..d3a6d1a3b8 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -110,7 +110,7 @@ module ActionView super() end - cattr_accessor :allow_external_files, instance_reader: false, instance_writer: false + cattr_accessor :allow_external_files, :instance_reader => false, :instance_writer => false self.allow_external_files = false private diff --git a/activerecord/test/cases/nested_attributes_test.rb b/activerecord/test/cases/nested_attributes_test.rb index f5f0517681..0a70bb0ccd 100644 --- a/activerecord/test/cases/nested_attributes_test.rb +++ b/activerecord/test/cases/nested_attributes_test.rb @@ -148,15 +148,15 @@ class TestNestedAttributesInGeneral < ActiveRecord::TestCase end def test_reject_if_is_not_short_circuited_if_allow_destroy_is_false - Pirate.accepts_nested_attributes_for :ship, reject_if: ->(a) { a[:name] == "The Golden Hind" }, allow_destroy: false + Pirate.accepts_nested_attributes_for :ship, :reject_if => lambda {|a| a[:name] == "The Golden Hind" }, :allow_destroy => false - pirate = Pirate.create!(catchphrase: "Stop wastin' me time", ship_attributes: { name: "White Pearl", _destroy: "1" }) + pirate = Pirate.create!(:catchphrase => "Stop wastin' me time", :ship_attributes => { :name => "White Pearl", :_destroy => "1" }) assert_equal "White Pearl", pirate.reload.ship.name - pirate.update!(ship_attributes: { id: pirate.ship.id, name: "The Golden Hind", _destroy: "1" }) + pirate.update_attributes(:ship_attributes => { :id => pirate.ship.id, :name => "The Golden Hind", :_destroy => "1" }) assert_equal "White Pearl", pirate.reload.ship.name - pirate.update!(ship_attributes: { id: pirate.ship.id, name: "Black Pearl", _destroy: "1" }) + pirate.update_attributes(:ship_attributes => { :id => pirate.ship.id, :name => "Black Pearl", :_destroy => "1" }) assert_equal "Black Pearl", pirate.reload.ship.name end |