aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAdam Milligan <amilligan@pivotallabs.com>2009-03-07 12:34:56 +0000
committerPratik Naik <pratiknaik@gmail.com>2009-03-07 12:34:56 +0000
commitf36513653fceb01691288dfdebfdc56d17dc85c9 (patch)
treeba052a1ceefb5977309b2fbb78486e94687486f9 /activerecord
parentc071123b3e2d6fd918dd7e419efe7429355445c2 (diff)
downloadrails-f36513653fceb01691288dfdebfdc56d17dc85c9.tar.gz
rails-f36513653fceb01691288dfdebfdc56d17dc85c9.tar.bz2
rails-f36513653fceb01691288dfdebfdc56d17dc85c9.zip
Fix RDoc grammar and ensure hm:t tests can run in isolation. [#1644 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb2
-rw-r--r--activerecord/lib/active_record/associations/has_many_through_association.rb4
-rw-r--r--activerecord/test/cases/associations/has_many_through_associations_test.rb2
3 files changed, 5 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 65a1319c7e..301b3a3b58 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -71,7 +71,7 @@ module ActiveRecord
# See ActiveRecord::Associations::ClassMethods for documentation.
module Associations # :nodoc:
- # These classes will be loaded when associatoins are created.
+ # These classes will be loaded when associations are created.
# So there is no need to eager load them.
autoload :AssociationCollection, 'active_record/associations/association_collection'
autoload :AssociationProxy, 'active_record/associations/association_proxy'
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb
index d5d188ac2a..23fe76de2e 100644
--- a/activerecord/lib/active_record/associations/has_many_through_association.rb
+++ b/activerecord/lib/active_record/associations/has_many_through_association.rb
@@ -23,8 +23,8 @@ module ActiveRecord
end
# Returns the size of the collection by executing a SELECT COUNT(*) query if the collection hasn't been loaded and
- # calling collection.size if it has. If it's more likely than not that the collection does have a size larger than zero
- # and you need to fetch that collection afterwards, it'll take one less SELECT query if you use length.
+ # calling collection.size if it has. If it's more likely than not that the collection does have a size larger than zero,
+ # and you need to fetch that collection afterwards, it'll take one fewer SELECT query if you use #length.
def size
return @owner.send(:read_attribute, cached_counter_attribute_name) if has_cached_counter?
return @target.size if loaded?
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb
index 1e5d1a0202..ac00508b5f 100644
--- a/activerecord/test/cases/associations/has_many_through_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb
@@ -1,6 +1,8 @@
require "cases/helper"
require 'models/post'
require 'models/person'
+require 'models/reference'
+require 'models/job'
require 'models/reader'
require 'models/comment'
require 'models/tag'