diff options
author | AvnerCohen <israbirding@gmail.com> | 2012-10-23 22:39:49 +0200 |
---|---|---|
committer | AvnerCohen <israbirding@gmail.com> | 2012-10-23 22:39:49 +0200 |
commit | 9edd4e18c411e6834569bbe7b6350f02342970d8 (patch) | |
tree | fa726e613b0dd94b3b33468970ddfd8688f11d95 /activerecord/lib/active_record/associations | |
parent | 3b89052014c2bf3b8fbbcfb93f657a17dd7e7ca3 (diff) | |
download | rails-9edd4e18c411e6834569bbe7b6350f02342970d8.tar.gz rails-9edd4e18c411e6834569bbe7b6350f02342970d8.tar.bz2 rails-9edd4e18c411e6834569bbe7b6350f02342970d8.zip |
Migration of docs to 1.9 hash syntax
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/preloader.rb | 6 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/through_association.rb | 2 |
2 files changed, 4 insertions, 4 deletions
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/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. # |