Is it possible in ruby/rails to order a result set after doing a find? For example, is it possible to do something like this
Warning: Does not work
if type == 1
@items = mycompany.items
else
@items = myhome.items
end
@items = @items :order => "created_at"
I would assume something like this should be possible, but I'm still very new to RoR and can't seem to find anything on google.