On Sep 19, 2:25 am, Frederick Cheung <[EMAIL PROTECTED]>
wrote:
> Why aren't you just doing Ticket.find :all, :conditions =>
> {:component_id => params[:component_ids}} ?

I'd go with this one from Fred. No need to worry about using the
params[:component_ids] directly in the finder, the input is being
sanitized by Rails before being used in the SQL, much like :conditions
=> ['field = ?', value] is. It generates an IN() condition if
params[:component_ids] is an array or an IS NULL condition if
params[:component_ids] is nil.
--~--~---------~--~----~------------~-------~--~----~
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 this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to