Forum: Ruby on Rails Could you tell me

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
joe-black <> (Guest)
on 2005-11-29 18:19
Hi guys
I met a situation like this:

ids = params[:ids]
          :conditions=>["id in (?)", ids])

debug, sql is:
SELECT * FROM blogs WHERE (id in ('8,6'))

any guy can tell me how to solve this kind of problem

all regards
Christer N. (Guest)
on 2005-11-29 18:41
Blog.find(ids) would solve this problem.
This topic is locked and can not be replied to.