Displaying 1 result from an estimated 1 matches for "i62muc2cqi4j".
2012 Mar 22
1
why doesn't .where() honor polymorphism?
I love the query interface (ActiveMethod::QueryMethods), but one thing
has bugged me: why doesn''t it generate calls for polymorphic
associations? For example:
class MyModel < ActiveRecord::Base
belongs_to :parent, :polymorphic => true
end
I would expect:
MyModel.where(:parent => a)
to be equivalent to:
MyModel.where("my_models.parent_id = ? AND