aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-11-16 16:35:52 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-11-16 16:35:52 +0100
commitca23287b448c2e007a5c93e43e762a10e0007b7a (patch)
treeff9bbd2f8e62d859b49d4afe6a3b552db648c804 /activerecord/lib/active_record/base.rb
parentff594b2bc94ff2a942fe6ca05672387722dee686 (diff)
downloadrails-ca23287b448c2e007a5c93e43e762a10e0007b7a.tar.gz
rails-ca23287b448c2e007a5c93e43e762a10e0007b7a.tar.bz2
rails-ca23287b448c2e007a5c93e43e762a10e0007b7a.zip
Revert "Added default_scope to Base [#1381 state:committed] (Paweł Kondzior)" -- won't gel with threads.
This reverts commit ff594b2bc94ff2a942fe6ca05672387722dee686.
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb10
1 files changed, 0 insertions, 10 deletions
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
- # <tt>method_scoping</tt> 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])