aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/models
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/test/models')
-rw-r--r--activemodel/test/models/topic.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activemodel/test/models/topic.rb b/activemodel/test/models/topic.rb
index 2f0bb95071..8d49c1dd27 100644
--- a/activemodel/test/models/topic.rb
+++ b/activemodel/test/models/topic.rb
@@ -29,4 +29,8 @@ class Topic
self.after_validation_performed = true
end
+ def my_validation
+ errors.add :title, "is missing" unless title
+ end
+
end