From ca23287b448c2e007a5c93e43e762a10e0007b7a Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 16 Nov 2008 16:35:52 +0100 Subject: =?UTF-8?q?Revert=20"Added=20default=5Fscope=20to=20Base=20[#1381?= =?UTF-8?q?=20state:committed]=20(Pawe=C5=82=20Kondzior)"=20--=20won't=20g?= =?UTF-8?q?el=20with=20threads.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ff594b2bc94ff2a942fe6ca05672387722dee686. --- activerecord/lib/active_record/base.rb | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'activerecord/lib/active_record/base.rb') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 9481c12b26..dcc8277849 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -2016,16 +2016,6 @@ module ActiveRecord #:nodoc: @@subclasses[self] + extra = @@subclasses[self].inject([]) {|list, subclass| list + subclass.subclasses } end - # Sets the default options for the model. The format of the - # method_scoping argument is the same as in with_scope. - # - # class Person << ActiveRecord::Base - # default_scope :find => { :order => 'last_name, first_name' } - # end - def default_scope(options = {}) - self.scoped_methods << { :find => options, :create => options.is_a?(Hash) ? options[:conditions] : {} } - end - # Test whether the given method and optional key are scoped. def scoped?(method, key = nil) #:nodoc: if current_scoped_methods && (scope = current_scoped_methods[method]) -- cgit v1.2.3