diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-11 09:41:08 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-18 08:12:59 +0900 |
commit | 9ac7dd47c5e847f7dbfb8d527ee2b917fa9fcd38 (patch) | |
tree | 272f5872138b5dbc41ffd7ea641e3c8721aad4dc /activerecord/lib/active_record/querying.rb | |
parent | 4bb4824ae711b7b550e8e33b428110575adaefac (diff) | |
download | rails-9ac7dd47c5e847f7dbfb8d527ee2b917fa9fcd38.tar.gz rails-9ac7dd47c5e847f7dbfb8d527ee2b917fa9fcd38.tar.bz2 rails-9ac7dd47c5e847f7dbfb8d527ee2b917fa9fcd38.zip |
Place class level `update`, `destroy`, and `delete` in `Persistence::ClassMethods`
The docs are obviously for class level `update`, `destroy`, and
`delete`. It should be placed in `Persistence::ClassMethods` rather than
`Relation`. And also, these methods are not dependent on relation. So it
is not needed to delegate to `all` (plus, `klass.find` is faster than
`relation.find`).
Diffstat (limited to 'activerecord/lib/active_record/querying.rb')
-rw-r--r-- | activerecord/lib/active_record/querying.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/querying.rb b/activerecord/lib/active_record/querying.rb index f780538319..3996d5661f 100644 --- a/activerecord/lib/active_record/querying.rb +++ b/activerecord/lib/active_record/querying.rb @@ -7,7 +7,7 @@ module ActiveRecord delegate :first_or_create, :first_or_create!, :first_or_initialize, to: :all delegate :find_or_create_by, :find_or_create_by!, :find_or_initialize_by, to: :all delegate :find_by, :find_by!, to: :all - delegate :destroy, :destroy_all, :delete, :delete_all, :update, :update_all, to: :all + delegate :destroy_all, :delete_all, :update_all, to: :all delegate :find_each, :find_in_batches, :in_batches, to: :all delegate :select, :group, :order, :except, :reorder, :limit, :offset, :joins, :left_joins, :left_outer_joins, :or, :where, :rewhere, :preload, :eager_load, :includes, :from, :lock, :readonly, :extending, |