diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-12-28 12:50:56 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-12-28 12:50:56 -0800 |
commit | 9fe42232f14eb44f06c655e87b54ff30cee0fe44 (patch) | |
tree | 2a9fa606752099a0f1cc9a27f77d08d9a0a634a0 /activerecord/test/models/pirate.rb | |
parent | a76af2309ac362ae1f38d24fd4746139deca3417 (diff) | |
parent | c23fbd0d475612fe9cd493bd08c8da2f8d7e6f03 (diff) | |
download | rails-9fe42232f14eb44f06c655e87b54ff30cee0fe44.tar.gz rails-9fe42232f14eb44f06c655e87b54ff30cee0fe44.tar.bz2 rails-9fe42232f14eb44f06c655e87b54ff30cee0fe44.zip |
Merge commit 'Fingertips/master'
Diffstat (limited to 'activerecord/test/models/pirate.rb')
-rw-r--r-- | activerecord/test/models/pirate.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/pirate.rb b/activerecord/test/models/pirate.rb index f2c05dd48f..88c1634717 100644 --- a/activerecord/test/models/pirate.rb +++ b/activerecord/test/models/pirate.rb @@ -19,6 +19,7 @@ class Pirate < ActiveRecord::Base # These both have :autosave enabled because accepts_nested_attributes_for is used on them. has_one :ship + has_one :update_only_ship, :class_name => 'Ship' has_one :non_validated_ship, :class_name => 'Ship' has_many :birds has_many :birds_with_method_callbacks, :class_name => "Bird", @@ -35,6 +36,7 @@ class Pirate < ActiveRecord::Base accepts_nested_attributes_for :parrots, :birds, :allow_destroy => true, :reject_if => proc { |attributes| attributes.empty? } accepts_nested_attributes_for :ship, :allow_destroy => true, :reject_if => proc { |attributes| attributes.empty? } + accepts_nested_attributes_for :update_only_ship, :update_only => true accepts_nested_attributes_for :parrots_with_method_callbacks, :parrots_with_proc_callbacks, :birds_with_method_callbacks, :birds_with_proc_callbacks, :allow_destroy => true accepts_nested_attributes_for :birds_with_reject_all_blank, :reject_if => :all_blank |