aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-11-09 10:35:39 +0000
committerJon Leighton <j@jonathanleighton.com>2012-11-09 10:38:58 +0000
commit0130c17476b754aea20faf6914686c5d4c7086b9 (patch)
tree110c00f74453bee05b38ce3ae435cec0f814eda8 /activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb
parentc33cfa6379e98a134672ae46580fcb54ce071f4f (diff)
downloadrails-0130c17476b754aea20faf6914686c5d4c7086b9.tar.gz
rails-0130c17476b754aea20faf6914686c5d4c7086b9.tar.bz2
rails-0130c17476b754aea20faf6914686c5d4c7086b9.zip
Relations built off collection associations with an unsaved owner should be null relations
For example, the following should not run any query on the database: Post.new.comments.where(body: 'omg').to_a # => [] Fixes #5215.
Diffstat (limited to 'activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb')
0 files changed, 0 insertions, 0 deletions