You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transactions::AcceptedQuery.call will not receive Transaction.latest as the scope argument, but rather it's base_relation ie: Transaction.all. Am I looking at this right? Is there a workaround for this other than using a class method?
I like the elegance of scope :accepted, Transactions::AcceptedQuery but I can't get it to work.
Thank you for your time and energy! I've learned a lot from this Repo already!
The text was updated successfully, but these errors were encountered:
Hi! Sorry for the noise! After doing a bit more research I now understand that scopes are chained correctly with some Rails magic using scoping. This article (although somewhat old) helped me find this code. I leave those for reference. Feel free to close!
To be clear, I'm using your implementation as a reference and not importing it directly, so it's likely I'm missing something!
If I use a query object like this:
If I try to compose the scopes:
Transactions::AcceptedQuery.call
will not receiveTransaction.latest
as the scope argument, but rather it'sbase_relation
ie:Transaction.all
. Am I looking at this right? Is there a workaround for this other than using a class method?I like the elegance of
scope :accepted, Transactions::AcceptedQuery
but I can't get it to work.Thank you for your time and energy! I've learned a lot from this Repo already!
The text was updated successfully, but these errors were encountered: