aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/ship.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2014-05-03 16:19:24 +0930
committerMatthew Draper <matthew@trebex.net>2014-05-03 16:29:40 +0930
commit022c797926591ed62d63f403ef314f2461b506ea (patch)
tree3e044af4274a7fc22f1e2950c5af198661dfc384 /activerecord/test/models/ship.rb
parent193eb6252f0b2f0031acdb3157d4bb2efc0447c6 (diff)
parentc6d685ba1118cc1f6303122117df945ebe8fceae (diff)
downloadrails-022c797926591ed62d63f403ef314f2461b506ea.tar.gz
rails-022c797926591ed62d63f403ef314f2461b506ea.tar.bz2
rails-022c797926591ed62d63f403ef314f2461b506ea.zip
Merge pull request #14924 from eric-chahin/issue_13854
Fixed custom validation context bug for child associations
Diffstat (limited to 'activerecord/test/models/ship.rb')
-rw-r--r--activerecord/test/models/ship.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/models/ship.rb b/activerecord/test/models/ship.rb
index 3da031946f..77a4728d0b 100644
--- a/activerecord/test/models/ship.rb
+++ b/activerecord/test/models/ship.rb
@@ -17,3 +17,9 @@ class Ship < ActiveRecord::Base
false
end
end
+
+class FamousShip < ActiveRecord::Base
+ self.table_name = 'ships'
+ belongs_to :famous_pirate
+ validates_presence_of :name, on: :conference
+end