aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/categorization.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-04-04 00:07:45 +0100
committerAaron Patterson <aaron.patterson@gmail.com>2011-04-12 19:46:04 -0700
commit5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6 (patch)
treee8f0dff39f96658699b66749b4a257ba8ccfda9f /activerecord/test/models/categorization.rb
parentfc9a04b6a69d6821a6f1601e3e0dd518300fa138 (diff)
downloadrails-5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6.tar.gz
rails-5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6.tar.bz2
rails-5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6.zip
Deprecated support for passing hashes and relations to default_scope, in favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details.
Diffstat (limited to 'activerecord/test/models/categorization.rb')
-rw-r--r--activerecord/test/models/categorization.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/models/categorization.rb b/activerecord/test/models/categorization.rb
index 09489b8ea4..39441e8610 100644
--- a/activerecord/test/models/categorization.rb
+++ b/activerecord/test/models/categorization.rb
@@ -13,7 +13,9 @@ end
class SpecialCategorization < ActiveRecord::Base
self.table_name = 'categorizations'
- default_scope where(:special => true)
+ def self.default_scope
+ where(:special => true)
+ end
belongs_to :author
belongs_to :category