aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-09-01 12:04:29 -0400
committerSantiago Pastorino <santiago@wyeworks.com>2010-09-05 08:13:42 -0300
commit91fec0d24d50d3b3e90c48b2501ca913544781cc (patch)
treef3dd8ff6c1f9b1ca6f3029a827297904ce165e22 /activerecord/test/fixtures
parentf9c21ce6580601109a6c4ac55c63bdea031f3203 (diff)
downloadrails-91fec0d24d50d3b3e90c48b2501ca913544781cc.tar.gz
rails-91fec0d24d50d3b3e90c48b2501ca913544781cc.tar.bz2
rails-91fec0d24d50d3b3e90c48b2501ca913544781cc.zip
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>
Diffstat (limited to 'activerecord/test/fixtures')
-rw-r--r--activerecord/test/fixtures/cars.yml5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/cars.yml b/activerecord/test/fixtures/cars.yml
index 23c98e8144..b4c748aaa7 100644
--- a/activerecord/test/fixtures/cars.yml
+++ b/activerecord/test/fixtures/cars.yml
@@ -2,3 +2,8 @@ honda:
id: 1
name: honda
engines_count: 0
+
+zyke:
+ id: 2
+ name: zyke
+ engines_count: 0