aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/bird.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/bird.rb')
-rw-r--r--activerecord/test/models/bird.rb5
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