diff options
Diffstat (limited to 'activerecord/lib/active_record/associations')
4 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb index b989a1e161..99e7383d42 100644 --- a/activerecord/lib/active_record/associations/association.rb +++ b/activerecord/lib/active_record/associations/association.rb @@ -223,7 +223,7 @@ module ActiveRecord end # This should be implemented to return the values of the relevant key(s) on the owner, - # so that when state_state is different from the value stored on the last find_target, + # so that when stale_state is different from the value stored on the last find_target, # the target is stale. # # This is only relevant to certain associations, which is why it returns nil by default. diff --git a/activerecord/lib/active_record/associations/preloader.rb b/activerecord/lib/active_record/associations/preloader.rb index c1cd3a4ae3..0848e7afb3 100644 --- a/activerecord/lib/active_record/associations/preloader.rb +++ b/activerecord/lib/active_record/associations/preloader.rb @@ -72,7 +72,7 @@ module ActiveRecord # books. # - a Hash which specifies multiple association names, as well as # association names for the to-be-preloaded association objects. For - # example, specifying <tt>{ :author => :avatar }</tt> will preload a + # example, specifying <tt>{ author: :avatar }</tt> will preload a # book's author, as well as that author's avatar. # # +:associations+ has the same format as the +:include+ option for @@ -80,8 +80,8 @@ module ActiveRecord # # :books # [ :books, :author ] - # { :author => :avatar } - # [ :books, { :author => :avatar } ] + # { author: :avatar } + # [ :books, { author: :avatar } ] def initialize(records, associations, preload_scope = nil) @records = Array.wrap(records).compact.uniq @associations = Array.wrap(associations) diff --git a/activerecord/lib/active_record/associations/singular_association.rb b/activerecord/lib/active_record/associations/singular_association.rb index 32f4557c28..10238555f0 100644 --- a/activerecord/lib/active_record/associations/singular_association.rb +++ b/activerecord/lib/active_record/associations/singular_association.rb @@ -12,7 +12,7 @@ module ActiveRecord target end - # Implements the writer method, e.g. foo.items= for Foo.has_many :items + # Implements the writer method, e.g. foo.bar= for Foo.belongs_to :bar def writer(record) replace(record) end diff --git a/activerecord/lib/active_record/associations/through_association.rb b/activerecord/lib/active_record/associations/through_association.rb index b9e014735b..43520142bf 100644 --- a/activerecord/lib/active_record/associations/through_association.rb +++ b/activerecord/lib/active_record/associations/through_association.rb @@ -28,7 +28,7 @@ module ActiveRecord # methods which create and delete records on the association. # # We only support indirectly modifying through associations which has a belongs_to source. - # This is the "has_many :tags, :through => :taggings" situation, where the join model + # This is the "has_many :tags, through: :taggings" situation, where the join model # typically has a belongs_to on both side. In other words, associations which could also # be represented as has_and_belongs_to_many associations. # |