diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-11-03 01:56:16 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-11-03 01:56:16 +0530 |
commit | 3b0bb08699ce409b8213c82956dc34086dcbc8b9 (patch) | |
tree | 34398e3421fcfd86aab2b5fc757175dd2ce7664d /activerecord/lib/active_record/associations | |
parent | 974467d70d337d4c60414c792e275d367143217b (diff) | |
parent | ee917493e451e552fef18367f8bcba2f36080685 (diff) | |
download | rails-3b0bb08699ce409b8213c82956dc34086dcbc8b9.tar.gz rails-3b0bb08699ce409b8213c82956dc34086dcbc8b9.tar.bz2 rails-3b0bb08699ce409b8213c82956dc34086dcbc8b9.zip |
Merge branch 'master' of github.com:lifo/docrails
Conflicts:
actionpack/lib/action_controller/metal/mime_responds.rb
activerecord/lib/active_record/attribute_methods.rb
guides/source/working_with_javascript_in_rails.md
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. # |