cond = EZ::Where::Condition.new do
category_id === [category_id] # these are integers coming in
state_id === [state_id] # same
term_id === [term_id] # same
city =~ ‘%city’ # this would be a string
I don't know this plugin at all, but normally you need to give a
thingie> in a block, so my guess would be:
cond = EZ::Where::Condition.new do |ez|
ez.category_id === [category_id] # these are integers coming in
ez.state_id === [state_id] # same
ez.term_id === [term_id] # same
ez.city =~ '%city' # this would be a string
ez.title =~ '%title' # string as well
No, '=~' maps to a LIKE SQL action, so the format specified is correct.
He is missing a table name for the block... It should be something
like this..
cond = EZ::Where::Condition.new :some_table_name do
category_id === [category_id] # these are integers coming in
state_id === [state_id] # same
term_id === [term_id] # same
city =~ '%city' # this would be a string
title =~ '%title' # string as well
end