diff options
author | Eugene Kenny <elkenny@gmail.com> | 2017-10-16 00:20:20 +0100 |
---|---|---|
committer | Eugene Kenny <elkenny@gmail.com> | 2017-10-16 00:20:20 +0100 |
commit | 5ea4cae911604eb879f68f66fad4e83121d1b072 (patch) | |
tree | ba009354cd8b367f990d164ed75d30f9de6bfd67 /activerecord | |
parent | 8b52d4cfd26964e7d1b7d462253d399b243ab256 (diff) | |
download | rails-5ea4cae911604eb879f68f66fad4e83121d1b072.tar.gz rails-5ea4cae911604eb879f68f66fad4e83121d1b072.tar.bz2 rails-5ea4cae911604eb879f68f66fad4e83121d1b072.zip |
Remove association(true) references from docs [ci skip]
Passing `true` to force an association to reload its records from the
database was deprecated in 5.0 and removed in 5.1.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/collection_proxy.rb | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index ef26f4a20c..91f915183a 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -850,7 +850,7 @@ module ActiveRecord # project.milestones # fetches milestones from the database # project.milestones.size # uses the milestone cache # project.milestones.empty? # uses the milestone cache - # project.milestones(true).size # fetches milestones from the database + # project.milestones.reload.size # fetches milestones from the database # project.milestones # uses the milestone cache # # == Eager loading of associations diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index 412e89255d..07f7303f8d 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -1072,7 +1072,6 @@ module ActiveRecord end # Reloads the collection from the database. Returns +self+. - # Equivalent to <tt>collection(true)</tt>. # # class Person < ActiveRecord::Base # has_many :pets @@ -1086,9 +1085,6 @@ module ActiveRecord # # person.pets.reload # fetches pets from the database # # => [#<Pet id: 1, name: "Snoop", group: "dogs", person_id: 1>] - # - # person.pets(true) # fetches pets from the database - # # => [#<Pet id: 1, name: "Snoop", group: "dogs", person_id: 1>] def reload proxy_association.reload reset_scope |