Help with OR Logic with Attribute Filters

13 views
Skip to first unread message

Daniel Quach

unread,
Mar 22, 2012, 3:10:26 AM3/22/12
to thinkin...@googlegroups.com
I have a scenario where I need to pull all the webcontent objects, but give priority to the ids 1402, 1403, 1427, then populate the remaining webcontents

In this example I am only pulling webcontents with the link of 1402,1403,1427
 @webcontents =  WebContent.search '', :with=>{:web_food_ids=>[1402,1403,1427]}

What I need to do is
+ show all webcontents with 1402,1403,1427
+ show the remaining webcontents which aren't 1402,1403,1427

In the same query.

Any help or guidance on how to create this query?




Reply all
Reply to author
Forward
0 new messages