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
{{ message }}
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.
I've just been hit by a bug using this method @graywh, if I declare my scope with a lambda, I get the following error: wrong number of arguments (1 for 0) for scope :with_qty, lambda { where(:id.lt => 100) }
If I remove the lambda, it works: scope :with_qty, where(:id.lt => 100)
To make it work, I need to painfully add a management of the checkbox value, this way: scope :with_qty, lambda { |cb| cb == '1' ? where(:id.lt => 100) : scoped}
which makes me change all my scopes to manage the checkbox version... very ugly.
This works fine, however I want to use it as a check box
if checked then result set contains only where results with expiration less then today.
i.e. Show only expired []
Any ideas how to do this?
or implement a named scope based off of check_box ?
The text was updated successfully, but these errors were encountered: