but hypermesh expects scopes to always return relationships
you can effectively get this result by doing scope :foo, -> () { .....all } in other words apply all to every scope. This works except if you were to do this:
MyModel.unscoped.foo which would apply all when it shouldn't. So its a bit harder that automatically doing the above.
AR lets you do this:
scope :foo -> () { self }
but hypermesh expects scopes to always return relationships
you can effectively get this result by doing
scope :foo, -> () { .....all }
in other words applyall
to every scope. This works except if you were to do this:MyModel.unscoped.foo
which would applyall
when it shouldn't. So its a bit harder that automatically doing the above.