Am trying to do filtering part. Filtering means, when user selects some choices based on that product details will be displayed. If user selects women (department) and men department it should display all the products which belongs to both women and men. To do this I am concatenating two objects. It is working fine. But when am trying to do pagination then it is throwing an error like:
undefined method `current_page' for Array
I want to concatenate two ActiveRecord objects and result should be in object of same active record only. Please tell me how to do this.
Now what am trying is:
@products += @prods
EDIT
deptids=["1" "2"]
deptids.each do |did|
@prods=ProductDetail.where("department_id=?",did)
if !(@products.nil?)
@products += @prods
else
@products=@prods
end
end