Hi guys
I met a situation like this:
ids = params[:ids]
Blog.find(:all,
: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
Hi guys
I met a situation like this:
ids = params[:ids]
Blog.find(:all,
: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
Blog.find(ids) would solve this problem.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs