-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
A simple use where it can be usefull is when you want several different Class of subclass but not of all.
By example from inheritance model we have model Canvas, Browser and Firefox. If you add Safari and Chrome. How have all webkit browser ?
class Browser < Canvas
scope :webkit_engine, :where => {:_type.in => ['Safari', 'Chrome']}
end
But this scope failed because if we have STI, all the time we request on All _type of only one. You can't search by several.
So I made a patch in my branch feature-limit-by-type-inheritance-model to do that :
I made another patch to help made this request by add #type() Criterion
I think can be great to integrate it.