diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2011-03-29 15:08:40 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2011-03-29 17:21:21 +0100 |
commit | a9dafbb28de3e34c31ebf184fbc4e2042c7ff207 (patch) | |
tree | c203ba38afca1b4d521ef1ce0de513a27f49aa5c /activerecord/lib | |
parent | e8d20b858d004e26c3b8c25aae099fce2eca6857 (diff) | |
download | rails-a9dafbb28de3e34c31ebf184fbc4e2042c7ff207.tar.gz rails-a9dafbb28de3e34c31ebf184fbc4e2042c7ff207.tar.bz2 rails-a9dafbb28de3e34c31ebf184fbc4e2042c7ff207.zip |
Delegate first!, last!, any? and many? to scoped
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/base.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 616b5cc3b4..fe81c7dc2f 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -437,7 +437,8 @@ module ActiveRecord #:nodoc: self._attr_readonly = [] class << self # Class methods - delegate :find, :first, :last, :all, :destroy, :destroy_all, :exists?, :delete, :delete_all, :update, :update_all, :to => :scoped + delegate :find, :first, :first!, :last, :last!, :all, :exists?, :any?, :many?, :to => :scoped + delegate :destroy, :destroy_all, :delete, :delete_all, :update, :update_all, :to => :scoped delegate :find_each, :find_in_batches, :to => :scoped delegate :select, :group, :order, :except, :reorder, :limit, :offset, :joins, :where, :preload, :eager_load, :includes, :from, :lock, :readonly, :having, :create_with, :to => :scoped delegate :count, :average, :minimum, :maximum, :sum, :calculate, :to => :scoped |