I’m trying to figure out how to use counter_cache.
I’ve got Clients that have many Profiles. And I got things working so
when I add a new Profile, the profiles_count gets updated.
profile = client.profiles.new(params[:profile])
However, I’m stuck trying to figure out how to deal with UPDATING a
(moving it to a different Client). If I change the profile to a new
I can get the right profiles_count on the NEW client, but the OLD client
not updated (to reflect one fewer profile)
Anyone have any suggestion? I’ve been surprised at how little
I’ve found about using couter_cache. Any good, thorough tutorials out
View this message in context:
Sent from the RubyOnRails Users forum at Nabble.com.