aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/image.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-12-10 19:15:07 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-12-10 19:15:07 -0200
commit81e940c313b6924915ca77a0f3af66332c9f0b1f (patch)
tree0648b6f0e34b6cc7e440fff03593e090d7cb8cd0 /activerecord/test/models/image.rb
parentefe80bce9765f7fcc1d09338a212f8ea1c4d7a7a (diff)
parent075c81feec87b1e5bfec27ed585c4ab613c2d174 (diff)
downloadrails-81e940c313b6924915ca77a0f3af66332c9f0b1f.tar.gz
rails-81e940c313b6924915ca77a0f3af66332c9f0b1f.tar.bz2
rails-81e940c313b6924915ca77a0f3af66332c9f0b1f.zip
Merge pull request #17970 from ulissesalmeida/foreign-type-has-many-has-one
Add foreign_type option for polymorphic has_one and has_many.
Diffstat (limited to 'activerecord/test/models/image.rb')
-rw-r--r--activerecord/test/models/image.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/models/image.rb b/activerecord/test/models/image.rb
new file mode 100644
index 0000000000..7ae8e4a7f6
--- /dev/null
+++ b/activerecord/test/models/image.rb
@@ -0,0 +1,3 @@
+class Image < ActiveRecord::Base
+ belongs_to :imageable, foreign_key: :imageable_identifier, foreign_type: :imageable_class
+end