Forum: Ruby on Rails Replacement for "has_many counter_sql" in Rails 4.1

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
14bed60ff664d5d2f4ca1b103c6ad6c1?d=identicon&s=25 Svoop (Guest)
on 2014-04-11 15:06
(Received via mailing list)
Hi

I'm looking for ways to replace "has_many ... counter_sql: '...'" in
order
to migrate an app from Rails 3.2 to 4.0 (done) and then up to 4.1 which
has
dropped support for "counter_sql". An example is on Stackoverflow:

http://stackoverflow.com/questions/22988321/replac...

I'd do it with a separate counter method, but it doesn't feel like the
ideal solution.

Thanks for your hints!
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2014-04-11 17:40
(Received via mailing list)
On Friday, April 11, 2014 2:05:54 PM UTC+1, Svoop wrote:

> ideal solution.
>
>
my guess would be an association extension - i put more details on your
stack overflow question.

Fred
This topic is locked and can not be replied to.