On 25 November 2015 at 12:31, fugee ohu <fugee...@gmail.com> wrote: > i'm trying to create an sql select from listings like this > `@listings=Listing.where("category_id in [1, 2, etc.])` > i'm using awesome_nested_set and it has a "children" method helper for the > Category model that returns all the children categories in an array I was > thinking i have to step through the array to build a string to insert into > my sql select statement, but i don't wanna re-invent the wheel Since this is > so common maybe there's a method already written for this?
As I said in a previous post, if you are explicitly using model.id you are probably not doing things the best way. Please provide details of why you need to do this. There is almost certainly a better way. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtapD%3D%2BCnjkU43uOROui8avWQyyTpORkjT93XntofomkA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.