diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2016-02-17 13:56:55 -0800 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2016-02-17 13:56:55 -0800 |
commit | f1866e81a392f61552bc03b4f9a54b97d65e98f0 (patch) | |
tree | 4168ff2a31a39b8a9c6161fedc5fa6ee01c9b35f /activerecord/test/models/car.rb | |
parent | 011711ecc9bfe9bdbc1fc17d57d511373954d415 (diff) | |
parent | 359adaedd95293af3abde954279ad51e11856d57 (diff) | |
download | rails-f1866e81a392f61552bc03b4f9a54b97d65e98f0.tar.gz rails-f1866e81a392f61552bc03b4f9a54b97d65e98f0.tar.bz2 rails-f1866e81a392f61552bc03b4f9a54b97d65e98f0.zip |
Merge pull request #22365 from phuibonhoa/phuibonhoa/polymorphic_where_multiple_types
Fixed `where` for polymorphic associations when passed an array containing different types.
Diffstat (limited to 'activerecord/test/models/car.rb')
-rw-r--r-- | activerecord/test/models/car.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/car.rb b/activerecord/test/models/car.rb index 778c22b1f6..0f37e9a289 100644 --- a/activerecord/test/models/car.rb +++ b/activerecord/test/models/car.rb @@ -12,6 +12,8 @@ class Car < ActiveRecord::Base has_many :engines, :dependent => :destroy, inverse_of: :my_car has_many :wheels, :as => :wheelable, :dependent => :destroy + has_many :price_estimates, :as => :estimate_of + scope :incl_tyres, -> { includes(:tyres) } scope :incl_engines, -> { includes(:engines) } |