hyper-mesh icon indicating copy to clipboard operation
hyper-mesh copied to clipboard

allow scopes to return AR models as well

Open catmando opened this issue 7 years ago • 0 comments

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 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.

catmando avatar Mar 09 '18 15:03 catmando