Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

multiple values for a block parameter (0 for 1) #130

Open
powertoaster opened this issue Oct 5, 2010 · 1 comment
Open

multiple values for a block parameter (0 for 1) #130

powertoaster opened this issue Oct 5, 2010 · 1 comment

Comments

@powertoaster
Copy link

I do not understand why I m getting this message. The query is built and executed properly.

Is there a way to prevent this warning?

Here is my query.
self.timesheets.tsdate_gte(period['begin']).tsdate_lte(period['end']).breakfast_eq_or_lunch_eq_or_dinner_eq(true).ascend_by_tsdate

Here is the resulting SQL which is exactly what I want.
SELECT * FROM "timesheets" WHERE (((timesheets.breakfast = 't') OR (timesheets.lunch = 't') OR (timesheets.dinner = 't')) AND ((timesheets.tsdate <= '2010-10-09 23:59:59') AND ((timesheets.tsdate >= '2010-09-26 00:00:00') AND ("timesheets".employee_id = 1012120475)))) ORDER BY timesheets.tsdate ASC

Here is the warning message and locations I get.

RubymineProjects/newtime/vendor/gems/searchlogic-2.4.25/lib/searchlogic/named_scopes/conditions.rb:172
RubymineProjects/newtime/vendor/gems/searchlogic-2.4.25/lib/searchlogic/named_scopes/conditions.rb:110: warning: multiple values for a block parameter (0 for 1)

@powertoaster
Copy link
Author

It did not wrap my query, so here it is on two lines.
self.timesheets.tsdate_gte(period['begin']).tsdate_lte(period['end']).
breakfast_eq_or_lunch_eq_or_dinner_eq(true).ascend_by_tsdate

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant