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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/models/bird.rb b/activerecord/test/models/bird.rb
index 341d2eeffc..e61d48e6a5 100644
--- a/activerecord/test/models/bird.rb
+++ b/activerecord/test/models/bird.rb
@@ -1,3 +1,9 @@
class Bird < ActiveRecord::Base
validates_presence_of :name
+
+ 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