diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-10 19:15:07 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-10 19:15:07 -0200 |
commit | 81e940c313b6924915ca77a0f3af66332c9f0b1f (patch) | |
tree | 0648b6f0e34b6cc7e440fff03593e090d7cb8cd0 /activerecord/test/models/image.rb | |
parent | efe80bce9765f7fcc1d09338a212f8ea1c4d7a7a (diff) | |
parent | 075c81feec87b1e5bfec27ed585c4ab613c2d174 (diff) | |
download | rails-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.rb | 3 |
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 |