<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in 'question about callbacks' | Pragmatic Forums</title>
    <link>http://forums.pragprog.com/forums/74/topics/693</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <description></description>
    <item>
      <title>question about callbacks posted by Ryan Bates @ Fri, 18 Jul 2008 17:08:37 -0000</title>
      <description>&lt;p&gt;Good question. The counter_cache does handle the case of moving a review from one movie to another. However it does not do it using callbacks &amp;#8211; it is deeper ingrained inside the code itself. Specifically in the BelongsToAssociation#replace method.&lt;/p&gt;</description>
      <pubDate>Fri, 18 Jul 2008 17:08:37 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:74:693:3694</guid>
      <author>Ryan Bates</author>
      <link>http://forums.pragprog.com/forums/74/topics/693</link>
    </item>
    <item>
      <title>question about callbacks posted by Frank @ Thu, 17 Jul 2008 19:56:43 -0000</title>
      <description>&lt;p&gt;Hi Ryan
 i just finished watching the first 4 episodes of everyday activerecord. I really enjoyed them and I learned a lot.&lt;/p&gt;


	&lt;p&gt;I have a question regarding the callbacks episode. Near the end of the episode you modified the callback called clear_movie_average_stars_cache to handle the case where a review is moved from one movie to another. I think I fully understand that part. But what about the reviews_count ? Does that get automatically adjusted when you move a review from one movie to another due to :counter_cache =&amp;gt; true ? I was under the impression that :counter_cache =&amp;gt; true only changes the count for create and destroy.&lt;/p&gt;


	&lt;p&gt;- thanks,&lt;br /&gt;Francois&lt;/p&gt;</description>
      <pubDate>Thu, 17 Jul 2008 19:56:43 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:74:693:3677</guid>
      <author>Frank</author>
      <link>http://forums.pragprog.com/forums/74/topics/693</link>
    </item>
  </channel>
</rss>
