@@ -1816,7 +1816,7 @@ def has_one(name, scope = nil, **options)
1816
1816
# named <tt>#{table_name}_count</tt> (such as +comments_count+ for a belonging Comment class)
1817
1817
# is used on the associate class (such as a Post class) - that is the migration for
1818
1818
# <tt>#{table_name}_count</tt> is created on the associate class (such that <tt>Post.comments_count</tt> will
1819
- # return the count cached, see note below ). You can also specify a custom counter
1819
+ # return the count cached). You can also specify a custom counter
1820
1820
# cache column by providing a column name instead of a +true+/+false+ value to this
1821
1821
# option (e.g., <tt>counter_cache: :my_custom_counter</tt>.)
1822
1822
#
@@ -1829,12 +1829,10 @@ def has_one(name, scope = nil, **options)
1829
1829
# use <tt>counter_cache: { active: false }</tt>.
1830
1830
# If you also need to specify a custom column name, use <tt>counter_cache: { active: false, column: :my_custom_counter }</tt>.
1831
1831
#
1832
- # Note: Specifying a counter cache will add it to that model's list of readonly attributes
1833
- # using +attr_readonly+.
1834
- # [+:polymorphic+]
1835
- # Specify this association is a polymorphic association by passing +true+.
1836
1832
# Note: If you've enabled the counter cache, then you may want to add the counter cache attribute
1837
1833
# to the +attr_readonly+ list in the associated classes (e.g. <tt>class Post; attr_readonly :comments_count; end</tt>).
1834
+ # [+:polymorphic+]
1835
+ # Specify this association is a polymorphic association by passing +true+.
1838
1836
# Note: Since polymorphic associations rely on storing class names in the database, make sure to update the class names in the
1839
1837
# <tt>*_type</tt> polymorphic type column of the corresponding rows.
1840
1838
# [+:validate+]
0 commit comments