<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Acts As Rateable Plugin</title>
	<atom:link href="http://juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/</link>
	<description>Break Coders Block!</description>
	<lastBuildDate>Tue, 31 Jan 2012 15:29:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Thomas Olausson &#187; Blog Archive &#187; find items not rated or created by user</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/comment-page-1/#comment-181</link>
		<dc:creator>Thomas Olausson &#187; Blog Archive &#187; find items not rated or created by user</dc:creator>
		<pubDate>Tue, 27 May 2008 08:50:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/#comment-181</guid>
		<description>[...] been using the acts_as_rateable plugin at a client project. On a page, we needed to show items that weren&#8217;t rated or created [...]</description>
		<content:encoded><![CDATA[<p>[...] been using the acts_as_rateable plugin at a client project. On a page, we needed to show items that weren&#8217;t rated or created [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2008-03-31 &#171; Web Flakes</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/comment-page-1/#comment-179</link>
		<dc:creator>links for 2008-03-31 &#171; Web Flakes</dc:creator>
		<pubDate>Mon, 31 Mar 2008 06:36:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/#comment-179</guid>
		<description>[...] Acts As Rateable Plugin Used this Plugin in LWF but followed instructions from Dave Naffis http://www.naffis.com/2006/8/31/rails-ajax-star-rating-system (tags: star.rating plugin acts_as_rateable ajax) [...]</description>
		<content:encoded><![CDATA[<p>[...] Acts As Rateable Plugin Used this Plugin in LWF but followed instructions from Dave Naffis <a href="http://www.naffis.com/2006/8/31/rails-ajax-star-rating-system" rel="nofollow">http://www.naffis.com/2006/8/31/rails-ajax-star-rating-system</a> (tags: star.rating plugin acts_as_rateable ajax) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: plug in ??????????????????????? Ruby on Rails &#171; Neokain on Rails</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/comment-page-1/#comment-180</link>
		<dc:creator>plug in ??????????????????????? Ruby on Rails &#171; Neokain on Rails</dc:creator>
		<pubDate>Mon, 17 Mar 2008 12:54:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/#comment-180</guid>
		<description>[...] acts_as_rateable ????????????????????? rating [...]</description>
		<content:encoded><![CDATA[<p>[...] acts_as_rateable ????????????????????? rating [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rails Plugins Recommendations</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/comment-page-1/#comment-173</link>
		<dc:creator>Rails Plugins Recommendations</dc:creator>
		<pubDate>Mon, 21 Jan 2008 04:12:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/#comment-173</guid>
		<description>[...] Acts As Rateable - If you have locations you&#8217;ll need to rate them right? Chances are there&#8217;s other things on your site that need rating as well, so this cleans up some of the code for this. It&#8217;s something that could be done without a plugin, sure, but adding &#8220;acts_as_rateable&#8221; to a model is all you need to get going. [...]</description>
		<content:encoded><![CDATA[<p>[...] Acts As Rateable &#8211; If you have locations you&#8217;ll need to rate them right? Chances are there&#8217;s other things on your site that need rating as well, so this cleans up some of the code for this. It&#8217;s something that could be done without a plugin, sure, but adding &#8220;acts_as_rateable&#8221; to a model is all you need to get going. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kyanh</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/comment-page-1/#comment-172</link>
		<dc:creator>kyanh</dc:creator>
		<pubDate>Sun, 20 Jan 2008 11:46:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/#comment-172</guid>
		<description>i have installed successfully acts_as_rateable. excellent plugin!  keep your great work!</description>
		<content:encoded><![CDATA[<p>i have installed successfully acts_as_rateable. excellent plugin!  keep your great work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TechKnow</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/comment-page-1/#comment-178</link>
		<dc:creator>TechKnow</dc:creator>
		<pubDate>Tue, 15 Jan 2008 07:23:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/#comment-178</guid>
		<description>@Lukas, @Dom - Thanks for the comment.  I have update the plugin accordingly.</description>
		<content:encoded><![CDATA[<p>@Lukas, @Dom &#8211; Thanks for the comment.  I have update the plugin accordingly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dom</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/comment-page-1/#comment-175</link>
		<dc:creator>Dom</dc:creator>
		<pubDate>Mon, 14 Jan 2008 07:01:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/#comment-175</guid>
		<description>Ok just thought I&#039;d let you know I fixed the issue by replacing the line 12 in acts_as_rateable.rb to:

has_many :ratings, :as =&gt; :rateable, :dependent =&gt; :destroy

The :dependent =&gt; true option on has_many association was deprecated in 1.1:

http://weblog.rubyonrails.org/2006/4/28/associations-arent-dependent-true-anymore</description>
		<content:encoded><![CDATA[<p>Ok just thought I&#8217;d let you know I fixed the issue by replacing the line 12 in acts_as_rateable.rb to:</p>
<p>has_many :ratings, :as =&gt; :rateable, :dependent =&gt; :destroy</p>
<p>The :dependent =&gt; true option on has_many association was deprecated in 1.1:</p>
<p><a href="http://weblog.rubyonrails.org/2006/4/28/associations-arent-dependent-true-anymore" rel="nofollow">http://weblog.rubyonrails.org/2006/4/28/associations-arent-dependent-true-anymore</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dom</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/comment-page-1/#comment-176</link>
		<dc:creator>Dom</dc:creator>
		<pubDate>Mon, 14 Jan 2008 05:16:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/#comment-176</guid>
		<description>Hi, I&#039;m getting the following error when trying to use this plugin with a model in rails 2.0.1:

ArgumentError in MediaController#articles

The :dependent option expects either :destroy, :delete_all, or :nullify (true)

My model is Article, it is currently using the following plugins:
has_self_referential_many_to_many :related
acts_as_taggable
acts_as_commentable
acts_as_rateable

If I comment out the first four plugins and leave rateable in, I still get the error.  It&#039;s currently breaking on this line:

Library/Ruby/Gems/1.8/gems/activerecord-2.0.1/lib/active_record/associations.rb:1149:in `configure_dependency_for_has_many&#039;

Can you help?</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m getting the following error when trying to use this plugin with a model in rails 2.0.1:</p>
<p>ArgumentError in MediaController#articles</p>
<p>The :dependent option expects either :destroy, :delete_all, or :nullify (true)</p>
<p>My model is Article, it is currently using the following plugins:<br />
has_self_referential_many_to_many :related<br />
acts_as_taggable<br />
acts_as_commentable<br />
acts_as_rateable</p>
<p>If I comment out the first four plugins and leave rateable in, I still get the error.  It&#8217;s currently breaking on this line:</p>
<p>Library/Ruby/Gems/1.8/gems/activerecord-2.0.1/lib/active_record/associations.rb:1149:in `configure_dependency_for_has_many&#8217;</p>
<p>Can you help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lukas</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/comment-page-1/#comment-177</link>
		<dc:creator>Lukas</dc:creator>
		<pubDate>Sun, 30 Dec 2007 12:19:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/#comment-177</guid>
		<description>with the newer version of rails there will be an error called :
&quot;The :dependent option expects either :destroy, :delete_all, or :nullify (true)&quot;
which appears in:
&quot;vendor/plugins/acts_as_rateable/lib/acts_as_rateable.rb:12:in `acts_as_rateable&#039;&quot;

The Line looks like this :
&quot;has_many :ratings, :as =&gt; :rateable, :dependent =&gt; true&quot;

just change the true to one of these :
&quot; :destroy This destroys the associated objects&quot;

&quot; :delete_all deletes them directly from the database &quot;

&quot; :nullify to set the keys to null&quot;

so the line should look somthing like this afterwards :

&quot;has_many :ratings, :as =&gt; :rateable, :dependent =&gt; :destroy&quot;</description>
		<content:encoded><![CDATA[<p>with the newer version of rails there will be an error called :<br />
&#8220;The :dependent option expects either :destroy, :delete_all, or :nullify (true)&#8221;<br />
which appears in:<br />
&#8220;vendor/plugins/acts_as_rateable/lib/acts_as_rateable.rb:12:in `acts_as_rateable&#8217;&#8221;</p>
<p>The Line looks like this :<br />
&#8220;has_many :ratings, :as =&gt; :rateable, :dependent =&gt; true&#8221;</p>
<p>just change the true to one of these :<br />
&#8221; :destroy This destroys the associated objects&#8221;</p>
<p>&#8221; :delete_all deletes them directly from the database &#8221;</p>
<p>&#8221; :nullify to set the keys to null&#8221;</p>
<p>so the line should look somthing like this afterwards :</p>
<p>&#8220;has_many :ratings, :as =&gt; :rateable, :dependent =&gt; :destroy&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Lowenfels</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/comment-page-1/#comment-171</link>
		<dc:creator>David Lowenfels</dc:creator>
		<pubDate>Thu, 20 Dec 2007 20:12:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/#comment-171</guid>
		<description>Anand:
The performance of the average rating calculation can be improved greatly by using SQL instead of ruby.

&lt;pre&gt;
# Helper method that returns the average rating
#
def rating
  Rating.average( :rating, :conditions =&gt; {
    :rateable_id =&gt; self.id,
    :rateable_type =&gt; self.class.name
  })
end
&lt;/pre&gt;

Seth:
use the find_ratings_by_user method</description>
		<content:encoded><![CDATA[<p>Anand:<br />
The performance of the average rating calculation can be improved greatly by using SQL instead of ruby.</p>
<pre>
# Helper method that returns the average rating
#
def rating
  Rating.average( :rating, :conditions =&gt; {
    :rateable_id =&gt; self.id,
    :rateable_type =&gt; self.class.name
  })
end
</pre>
<p>Seth:<br />
use the find_ratings_by_user method</p>
]]></content:encoded>
	</item>
</channel>
</rss>

