diff options
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/developer.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/test/models/developer.rb b/activerecord/test/models/developer.rb index 0c20f97502..92039a4f54 100644 --- a/activerecord/test/models/developer.rb +++ b/activerecord/test/models/developer.rb @@ -79,13 +79,13 @@ class DeveloperWithBeforeDestroyRaise < ActiveRecord::Base end class DeveloperOrderedBySalary < ActiveRecord::Base - self.table_name = 'developers' - default_scope :order => "salary DESC" + self.table_name = 'developers' + default_scope :order => 'salary DESC' + named_scope :by_name, :order => 'name DESC' - def self.all_ordered_by_name - with_scope(:find => { :order => "name DESC" }) do - find(:all) - end + def self.all_ordered_by_name + with_scope(:find => { :order => 'name DESC' }) do + find(:all) end - + end end |