aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorMichael Ryan <perceptec@gmail.com>2015-02-18 17:55:48 -0500
committerMichael Ryan <perceptec@gmail.com>2015-02-18 18:30:05 -0500
commitb9a1e9a4b2289de199b214a542aa9fd3cb19be54 (patch)
treea9f68a591fd3d430e4a77295a85a1a54961ae481 /activerecord/test/models
parent83be86933d7faf43ff1717f4258d54fc72d3193c (diff)
downloadrails-b9a1e9a4b2289de199b214a542aa9fd3cb19be54.tar.gz
rails-b9a1e9a4b2289de199b214a542aa9fd3cb19be54.tar.bz2
rails-b9a1e9a4b2289de199b214a542aa9fd3cb19be54.zip
Add `ActiveRecord::Base.suppress`
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/notification.rb2
-rw-r--r--activerecord/test/models/user.rb4
2 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/models/notification.rb b/activerecord/test/models/notification.rb
new file mode 100644
index 0000000000..b4b4b8f1b6
--- /dev/null
+++ b/activerecord/test/models/notification.rb
@@ -0,0 +1,2 @@
+class Notification < ActiveRecord::Base
+end
diff --git a/activerecord/test/models/user.rb b/activerecord/test/models/user.rb
index 23cd2e0e1c..f5dc93e994 100644
--- a/activerecord/test/models/user.rb
+++ b/activerecord/test/models/user.rb
@@ -2,3 +2,7 @@ class User < ActiveRecord::Base
has_secure_token
has_secure_token :auth_token
end
+
+class UserWithNotification < User
+ after_create -> { Notification.create! message: "A new user has been created." }
+end