-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
Example:
class Shape scope :visible, -> { large } scope :large, -> { all } end class Circle < Shape scope :large, -> { where(radius: 5) } end
Circle.visible.selector returns {}, instead of {{
{ "radius" => 5 }}}.
ActiveRecord also uses instance_exec when calling scopes.
This should also fix MONGOID-3599.