mark
1
Hi guys:
i have a question about Will_paginate .
i have mutilple same type collections.
for example .
items_1 = Post.find(:all , :conditions =>{…}) # different condtions to
get the items_1
items_2 = Post.find(:all, :conditions ={…}) # diffenrt conditions to
get the item_2
items = items_1 | items_1
then how i am supposed to do in next step ?
please help
mark
2
(the “Mark Ma” from Railsconf 07’?)
On 10-Dec-08, at 12:06 PM, Mark Ma wrote:
items_2 = Post.find(:all, :conditions ={…}) # diffenrt conditions to
get the item_2
items = items_1 | items_1
then how i am supposed to do in next step ?
please help
you can use the + ‘method’ to add collections
items = items_1 + items_2
but might make more sense to merge the conditions into an OR?
items = Post.find(:all, :conditions => “(#{item_one_conditions}) OR
(#{item_2_conditions})”)
Jodi