aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/car.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/car.rb')
-rw-r--r--activerecord/test/models/car.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/models/car.rb b/activerecord/test/models/car.rb
index 903ec53288..a1e351b54e 100644
--- a/activerecord/test/models/car.rb
+++ b/activerecord/test/models/car.rb
@@ -7,4 +7,9 @@ class Car < ActiveRecord::Base
scope :incl_tyres, includes(:tyres)
scope :incl_engines, includes(:engines)
+ default_scope :order => 'name desc'
+
+ scope :order_using_new_style, order('name asc')
+ scope :order_using_old_style, :order => 'name asc'
+
end