Any advice on generating a dynamic clause... for example, "saved search" where a user could select which column, operator, value which could be multiple as well... for example:
column, operator, value, next_operator
make == ford |
make == pontiac &
year == 1993..1998
anyone have tips on creating a dynamic query with Squeel. for example if i have an array of conditions [[column,operator,value],[column,operator,value]]
How would i iterate over those and dynamically build a query in squeel?
in ultra basic format
ruby
defself.with_conditions(conditions)
where do
conditions.each do |column,operator,value|
(column operator value)
endendend
Any advice on generating a dynamic clause... for example, "saved search" where a user could select which column, operator, value which could be multiple as well... for example:
column, operator, value, next_operator
make == ford |
make == pontiac &
year == 1993..1998
anyone have tips on creating a dynamic query with Squeel. for example if i have an array of conditions [[column,operator,value],[column,operator,value]]
How would i iterate over those and dynamically build a query in squeel?
in ultra basic format
I agree... would love to see a version of this gallery has_many photos association
agree... would love to see a change password, remember me as well