rails/activerecord/test/fixtures/cars.yml
Neeraj Singh 91fec0d24d order should always be concatenated.
order that is declared first has highest priority in all cases.

Here are some examples.

Car.order('name desc').find(:first, :order => 'id').name

Car.named_scope_with_order.named_scope_with_another_order

Car.order('id DESC').scoping do
  Car.find(:first, :order => 'id asc')
end

No special treatment to with_scope or scoping.

Also note that if default_scope declares an order then the order
declared in default_scope has the highest priority unless
with_exclusive_scope is used.

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-05 08:13:42 -03:00

10 lines
95 B
YAML

honda:
id: 1
name: honda
engines_count: 0
zyke:
id: 2
name: zyke
engines_count: 0