<?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 Commentable Plugin</title>
	<atom:link href="http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/</link>
	<description>Break Coders Block!</description>
	<lastBuildDate>Thu, 10 May 2012 17:02:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: J</title>
		<link>http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/comment-page-1/#comment-48148</link>
		<dc:creator>J</dc:creator>
		<pubDate>Thu, 16 Jun 2011 01:26:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/#comment-48148</guid>
		<description>It works for me in Rails 3.0.5 and Ruby 1.9.2, but it&#039;s a little bit annoying that I need to specify the user_id manually in the comment object:

     comment = Comment.new(:title =&gt; &#039;t&#039;, :comment =&gt; &#039;c&#039;, :user_id =&gt; 1)
     post.comments &lt;&lt; comment

if the post object has an user_id property why not using it? maybe through the add_comment method:

     def add_comment(comment)
         comment.user_id = user_id
         comments &lt;&lt; comment
    end

I don&#039;t if I&#039;m the only one having this problem. do I?</description>
		<content:encoded><![CDATA[<p>It works for me in Rails 3.0.5 and Ruby 1.9.2, but it&#8217;s a little bit annoying that I need to specify the user_id manually in the comment object:</p>
<p>     comment = Comment.new(:title =&gt; &#8216;t&#8217;, :comment =&gt; &#8216;c&#8217;, :user_id =&gt; 1)<br />
     post.comments &lt;&lt; comment</p>
<p>if the post object has an user_id property why not using it? maybe through the add_comment method:</p>
<p>     def add_comment(comment)<br />
         comment.user_id = user_id<br />
         comments &lt;&lt; comment<br />
    end</p>
<p>I don&#039;t if I&#039;m the only one having this problem. do I?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Data structures are complicated! [schema for storing gaming team match results] &#124; Tom Russell &#8211; A Ruby/Rails Developer</title>
		<link>http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/comment-page-1/#comment-43863</link>
		<dc:creator>Data structures are complicated! [schema for storing gaming team match results] &#124; Tom Russell &#8211; A Ruby/Rails Developer</dc:creator>
		<pubDate>Sun, 08 May 2011 08:49:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/#comment-43863</guid>
		<description>[...] matches between themselves and other teams. These should be commentable (i thought about using acts_as_commentable, but that doesn&#8217;t provide admin management of comments, anonymous commenting, or a captcha [...]</description>
		<content:encoded><![CDATA[<p>[...] matches between themselves and other teams. These should be commentable (i thought about using acts_as_commentable, but that doesn&#8217;t provide admin management of comments, anonymous commenting, or a captcha [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rahil Sondhi</title>
		<link>http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/comment-page-1/#comment-22246</link>
		<dc:creator>Rahil Sondhi</dc:creator>
		<pubDate>Thu, 09 Dec 2010 03:14:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/#comment-22246</guid>
		<description>Wow, thank you! More than four years later, your plugin still works. I&#039;m using Rails 3.0.0 and Ruby 1.9.2.</description>
		<content:encoded><![CDATA[<p>Wow, thank you! More than four years later, your plugin still works. I&#8217;m using Rails 3.0.0 and Ruby 1.9.2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TechKnow</title>
		<link>http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/comment-page-1/#comment-137</link>
		<dc:creator>TechKnow</dc:creator>
		<pubDate>Wed, 24 Jun 2009 20:39:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/#comment-137</guid>
		<description>@Jeff - Thanks for that info, I test this on a more recent Rails version.  I can&#039;t believe it, but this plugin was originally written in Rails 1.2 and now there is talk of Rails 3.0.</description>
		<content:encoded><![CDATA[<p>@Jeff &#8211; Thanks for that info, I test this on a more recent Rails version.  I can&#8217;t believe it, but this plugin was originally written in Rails 1.2 and now there is talk of Rails 3.0.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Tucker</title>
		<link>http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/comment-page-1/#comment-136</link>
		<dc:creator>Jeff Tucker</dc:creator>
		<pubDate>Wed, 24 Jun 2009 18:59:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/#comment-136</guid>
		<description>Thanks for the plugin!  One issue I had when installing though -- I grabbed the gem from your most recent commit (19 May 2009) and had the error:

&lt;pre&gt;
Expects acts_as_commentable.rb to define ActsAsCommentable (LoadError).
&lt;/pre&gt;

I had to add

&lt;pre&gt;
require &#039;comment_methods&#039;
&lt;/pre&gt;

to the top of lib/acts_as_commentable.rb to get everything running.</description>
		<content:encoded><![CDATA[<p>Thanks for the plugin!  One issue I had when installing though &#8212; I grabbed the gem from your most recent commit (19 May 2009) and had the error:</p>
<pre>
Expects acts_as_commentable.rb to define ActsAsCommentable (LoadError).
</pre>
<p>I had to add</p>
<pre>
require 'comment_methods'
</pre>
<p>to the top of lib/acts_as_commentable.rb to get everything running.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Auraelius</title>
		<link>http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/comment-page-1/#comment-132</link>
		<dc:creator>Auraelius</dc:creator>
		<pubDate>Thu, 16 Apr 2009 16:37:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/#comment-132</guid>
		<description>Hi,
I&#039;m having trouble when using acts_as_commentable with restful_authentication: The user_id field in the comment table is never getting set -- all the values are NULL.

I have a &quot;users&quot; table as supplied by that plugin. Is acts_as_commentable looking for a &quot;user&quot; table? I&#039;m still trying to understand all of Rails&#039; pluralization.

Where in the code does the user_id get set? I&#039;m stepping through the process with a debugger and can&#039;t see it happening. Is this something ActiveRecord does?

Thanks for helping a newbie figure things out!</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I&#8217;m having trouble when using acts_as_commentable with restful_authentication: The user_id field in the comment table is never getting set &#8212; all the values are NULL.</p>
<p>I have a &#8220;users&#8221; table as supplied by that plugin. Is acts_as_commentable looking for a &#8220;user&#8221; table? I&#8217;m still trying to understand all of Rails&#8217; pluralization.</p>
<p>Where in the code does the user_id get set? I&#8217;m stepping through the process with a debugger and can&#8217;t see it happening. Is this something ActiveRecord does?</p>
<p>Thanks for helping a newbie figure things out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AJAX with acts_as_commentable &#8212; sideline</title>
		<link>http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/comment-page-1/#comment-131</link>
		<dc:creator>AJAX with acts_as_commentable &#8212; sideline</dc:creator>
		<pubDate>Sun, 15 Feb 2009 16:14:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/#comment-131</guid>
		<description>[...] had fun this weekend with AJAX-ifying an implementation of the acts_as_commentable plugin. After reading (and implementing) Dave Naffis&#8217; article on adding AJAX to the [...]</description>
		<content:encoded><![CDATA[<p>[...] had fun this weekend with AJAX-ifying an implementation of the acts_as_commentable plugin. After reading (and implementing) Dave Naffis&#8217; article on adding AJAX to the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fran</title>
		<link>http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/comment-page-1/#comment-130</link>
		<dc:creator>Fran</dc:creator>
		<pubDate>Thu, 12 Feb 2009 09:21:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/#comment-130</guid>
		<description>Herval&#039;s dirty little hack to use counter_cache (site is down):

&lt;pre&gt;
#comments.rb

def after_create
 if commentable.attributes[&#039;comments_count&#039;]
  commentable.increment!(”comments_count”)
 end
end

def before_destroy
 if commentable.attributes[&#039;comments_count&#039;]
  commentable.class.decrement_counter(”comments_count”, commentable.id)
 end
end
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Herval&#8217;s dirty little hack to use counter_cache (site is down):</p>
<pre>
#comments.rb

def after_create
 if commentable.attributes['comments_count']
  commentable.increment!(”comments_count”)
 end
end

def before_destroy
 if commentable.attributes['comments_count']
  commentable.class.decrement_counter(”comments_count”, commentable.id)
 end
end
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Getting Close</title>
		<link>http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/comment-page-1/#comment-129</link>
		<dc:creator>Getting Close</dc:creator>
		<pubDate>Wed, 21 Jan 2009 00:52:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/#comment-129</guid>
		<description>[...] the acts_as_commentable plugin to the newest version. This allows me to streamline the code and add times to the [...]</description>
		<content:encoded><![CDATA[<p>[...] the acts_as_commentable plugin to the newest version. This allows me to streamline the code and add times to the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexey</title>
		<link>http://juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/comment-page-1/#comment-127</link>
		<dc:creator>Alexey</dc:creator>
		<pubDate>Tue, 18 Nov 2008 14:39:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/18/acts-as-commentable-plugin/#comment-127</guid>
		<description>I just remember year ago  i put this plugin in rails 1.2.6 .. now in 2.1.2 :)</description>
		<content:encoded><![CDATA[<p>I just remember year ago  i put this plugin in rails 1.2.6 .. now in 2.1.2 :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

