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 8d49c1dd27..c9af78f595 100644
--- a/activemodel/test/models/topic.rb
+++ b/activemodel/test/models/topic.rb
@@ -33,4 +33,8 @@ class Topic
errors.add :title, "is missing" unless title
end
+ def my_validation_with_arg(attr)
+ errors.add attr, "is missing" unless send(attr)
+ end
+
end