diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-12-15 04:50:13 -0800 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-12-15 04:50:13 -0800 |
commit | 0ddb9d6409677dc2b186316dac096c68743bea70 (patch) | |
tree | c4bc2445614d60147e004c89359bd75d262ed32d /activerecord/test/models/bird.rb | |
parent | ad87752ad6c1ea8cdf95642a052c93149fbb9d75 (diff) | |
parent | 774ff18c095145f544e845dbb940378546748969 (diff) | |
download | rails-0ddb9d6409677dc2b186316dac096c68743bea70.tar.gz rails-0ddb9d6409677dc2b186316dac096c68743bea70.tar.bz2 rails-0ddb9d6409677dc2b186316dac096c68743bea70.zip |
Merge pull request #3991 from akaspick/attrfix
Allow nested attributes in associations to update values in it's owner o...
Diffstat (limited to 'activerecord/test/models/bird.rb')
-rw-r--r-- | activerecord/test/models/bird.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/models/bird.rb b/activerecord/test/models/bird.rb index e61d48e6a5..dff099c1fb 100644 --- a/activerecord/test/models/bird.rb +++ b/activerecord/test/models/bird.rb @@ -1,9 +1,12 @@ class Bird < ActiveRecord::Base + belongs_to :pirate validates_presence_of :name + accepts_nested_attributes_for :pirate + attr_accessor :cancel_save_from_callback before_save :cancel_save_callback_method, :if => :cancel_save_from_callback def cancel_save_callback_method false end -end
\ No newline at end of file +end |