On Sun, Dec 2, 2012 at 4:26 PM, Jean <[email protected]> wrote:
> def self.searchadv(title, place, category, date)

Colour me doubtful, but since you're passing in category and date, why
are you using place in your category and date subclauses?

>         !place.blank? ? conditions << [' AND category LIKE ?', "%#{place}%"]
> :  conditions << []
>         !place.blank? ? conditions << [' AND date LIKE ?', "%#{place}%"] :
> conditions << []

I really like the way Fred puts it together by joining the fragments
into the where clause.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to