We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The greater or less than comparisons are reversed.
Example -- the gt() method as currently implemented:
gt()
def gt ... ... do |comparator, item| comparator > item
which is receives yield query_string, comparator from do_comparison, substituting from above:
yield query_string, comparator
do_comparison
def gt ... ... do |query_string, comparator| query_string > comparator
If you send SomeModel.where(:attribute).gt(1), that currently gets evaluated as:
SomeModel.where(:attribute).gt(1)
def gt ... ... do |1, attribute_value| 1 > attribute_value
If you're looking for all model instances with the attribute value greater than 1, it should be:
def gt ... ... do |1, attribute_value| 1 < attribute_value
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The greater or less than comparisons are reversed.
Example -- the
gt()
method as currently implemented:which is receives
yield query_string, comparator
fromdo_comparison
, substituting from above:If you send
SomeModel.where(:attribute).gt(1)
, that currently gets evaluated as:If you're looking for all model instances with the attribute value greater than 1, it should be:
The text was updated successfully, but these errors were encountered: