diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-03-13 23:29:30 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-03-13 23:29:30 +0530 |
commit | 800c70a8f9e6264e72019b1d8e18bddfa48f1373 (patch) | |
tree | f8d91928d5313a93248c0485a7c04e53f92bf856 /activerecord/lib/active_record/associations.rb | |
parent | cb7d19b66badfbd1846c195913419c331701074e (diff) | |
parent | a9f688648cf91b3424710c185b0f17982734d4b6 (diff) | |
download | rails-800c70a8f9e6264e72019b1d8e18bddfa48f1373.tar.gz rails-800c70a8f9e6264e72019b1d8e18bddfa48f1373.tar.bz2 rails-800c70a8f9e6264e72019b1d8e18bddfa48f1373.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index b1a5110e2d..b901f06ca4 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1382,7 +1382,9 @@ module ActiveRecord # and +decrement_counter+. The counter cache is incremented when an object of this # class is created and decremented when it's destroyed. This requires that a column # named <tt>#{table_name}_count</tt> (such as +comments_count+ for a belonging Comment class) - # is used on the associate class (such as a Post class). You can also specify a custom counter + # is used on the associate class (such as a Post class) - that is the migration for + # <tt>#{table_name}_count</tt> is created on the associate class (such that Post.comments_count will + # return the count cached, see note below). You can also specify a custom counter # cache column by providing a column name instead of a +true+/+false+ value to this # option (e.g., <tt>:counter_cache => :my_custom_counter</tt>.) # Note: Specifying a counter cache will add it to that model's list of readonly attributes |