Closed maikokuppe closed 5 years ago
After installing this gem, this does not work anymore (simplified code):
collection do Order.all end scopes do scope :my_orders, -> { collection } end
The error is
wrong number of arguments (given 0, expected 1)
referencing to the call to collection.
collection
I worked around this by defining collection globally:
collection = Order.all scopes do scope :my_orders, -> { collection } end
But that's just a workaround.
Oops. Solved it by using the block argument:
collection do Order.all end scopes do scope :my_orders, ->(collection) { collection } end
After installing this gem, this does not work anymore (simplified code):
The error is
referencing to the call to
collection
.I worked around this by defining
collection
globally:But that's just a workaround.