Hello, I have a model like this:

class Car < ActiveRecord::Base
  def color(c)
    where("color = ?",c)
  end
end

Suppose that I want to show the red and blue cars. I could do
something like this:
@cars = Car.color('blue') + Car.color('red')

The problem I'm finding is that now, @cars is an array and I could not
do something like that:
@cars.page(params[:page]).per(10)
@cars.order( ..... )
or any method ActiveRecord implements. The question is: ¿How can I
manage ActiveRecord array/collection for do: + - | &?

Thanks very much.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to