diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG.md | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/collection_proxy.rb | 6 | ||||
-rw-r--r-- | activerecord/lib/active_record/scoping/named.rb | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index a769a1c65e..e9f652b90e 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -788,7 +788,7 @@ end person.pets.delete("1") # => [#<Pet id: 1>] - person.pets.delete(2, 3) # => [#<Pet id: 2>, #<Pet id: 3>] + person.pets.delete(2, 3) # => [#<Pet id: 2>, #<Pet id: 3>] *Francesco Rodriguez* diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index 7f9628499c..7c43e37cf2 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -101,7 +101,7 @@ module ActiveRecord # # #<Pet id: 3, name: "Choo-Choo", person_id: 1> # # ] # - # person.pets.select(:name) { |pet| pet.name =~ /oo/ } + # person.pets.select(:name) { |pet| pet.name =~ /oo/ } # # => [ # # #<Pet id: 2, name: "Spook">, # # #<Pet id: 3, name: "Choo-Choo"> @@ -824,7 +824,7 @@ module ActiveRecord # # person.pets # => [#<Pet id: 20, name: "Snoop">] # - # person.pets.include?(Pet.find(20)) # => true + # person.pets.include?(Pet.find(20)) # => true # person.pets.include?(Pet.find(21)) # => false def include?(record) @association.include?(record) @@ -971,7 +971,7 @@ 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 + # person.pets(true) # fetches pets from the database # # => [#<Pet id: 1, name: "Snoop", group: "dogs", person_id: 1>] def reload proxy_association.reload diff --git a/activerecord/lib/active_record/scoping/named.rb b/activerecord/lib/active_record/scoping/named.rb index fb5f5b5be0..8b7eda6eee 100644 --- a/activerecord/lib/active_record/scoping/named.rb +++ b/activerecord/lib/active_record/scoping/named.rb @@ -116,7 +116,7 @@ module ActiveRecord # Scopes can also be used while creating/building a record. # # class Article < ActiveRecord::Base - # scope :published, -> { where(published: true) } + # scope :published, -> { where(published: true) } # end # # Article.published.new.published # => true @@ -126,7 +126,7 @@ module ActiveRecord # on scopes. Assuming the following setup: # # class Article < ActiveRecord::Base - # scope :published, -> { where(published: true) } + # scope :published, -> { where(published: true) } # scope :featured, -> { where(featured: true) } # # def self.latest_article |