<?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 Bookmarkable Plugin</title>
	<atom:link href="http://juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-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: Donovan</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/comment-page-1/#comment-191</link>
		<dc:creator>Donovan</dc:creator>
		<pubDate>Sat, 08 Mar 2008 22:41:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/#comment-191</guid>
		<description>This is really cool. Does the plug in work with Rails 2.0.x?</description>
		<content:encoded><![CDATA[<p>This is really cool. Does the plug in work with Rails 2.0.x?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TechKnow</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/comment-page-1/#comment-190</link>
		<dc:creator>TechKnow</dc:creator>
		<pubDate>Tue, 15 Jan 2008 07:24:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/#comment-190</guid>
		<description>@Tom - Thanks for the comment.  I have update the plugin accordingly.</description>
		<content:encoded><![CDATA[<p>@Tom &#8211; Thanks for the comment.  I have update the plugin accordingly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/comment-page-1/#comment-189</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Tue, 23 Oct 2007 22:20:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/#comment-189</guid>
		<description>I needed to do the following for Edge Rails  in acts_as_bookmarkable.rb:

change:
has_many :bookmarks, :as =&gt; :bookmarkable, :dependent =&gt; true

to:
has_many :bookmarks, :as =&gt; :bookmarkable, :dependent =&gt; :destroy

I did this to get my console to work.</description>
		<content:encoded><![CDATA[<p>I needed to do the following for Edge Rails  in acts_as_bookmarkable.rb:</p>
<p>change:<br />
has_many :bookmarks, :as =&gt; :bookmarkable, :dependent =&gt; true</p>
<p>to:<br />
has_many :bookmarks, :as =&gt; :bookmarkable, :dependent =&gt; :destroy</p>
<p>I did this to get my console to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frederico Araujo</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/comment-page-1/#comment-188</link>
		<dc:creator>Frederico Araujo</dc:creator>
		<pubDate>Fri, 23 Feb 2007 08:35:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/#comment-188</guid>
		<description>TechKnow, cool,
thanks for the help.</description>
		<content:encoded><![CDATA[<p>TechKnow, cool,<br />
thanks for the help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TechKnow</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/comment-page-1/#comment-187</link>
		<dc:creator>TechKnow</dc:creator>
		<pubDate>Mon, 12 Feb 2007 16:33:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/#comment-187</guid>
		<description>@Frederico - Thanks for you comment.  I had removed the add_bookmark method sometime ago and must had forgotten to remove it from here.

In regards to your second comment, I think I could add such a method as a convenience, but I don&#039;t want to further confuse users with the existing find_bookmarks_by_user(user).  You want an array of the bookmarked model such as Product or Post, and find_bookmarks_by_user returns an array of bookmarks.  Did you know that a bookmark has a reference to your model?  Yeah, you could say something like the following...

&lt;pre&gt;
product = bookmark.bookmarkable
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@Frederico &#8211; Thanks for you comment.  I had removed the add_bookmark method sometime ago and must had forgotten to remove it from here.</p>
<p>In regards to your second comment, I think I could add such a method as a convenience, but I don&#8217;t want to further confuse users with the existing find_bookmarks_by_user(user).  You want an array of the bookmarked model such as Product or Post, and find_bookmarks_by_user returns an array of bookmarks.  Did you know that a bookmark has a reference to your model?  Yeah, you could say something like the following&#8230;</p>
<pre>
product = bookmark.bookmarkable
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frederico Araujo</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/comment-page-1/#comment-186</link>
		<dc:creator>Frederico Araujo</dc:creator>
		<pubDate>Mon, 12 Feb 2007 11:54:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/#comment-186</guid>
		<description>I have an add to your plugin.  the below example is for finding all the Products bookmarked by a given user_id

&lt;pre&gt;
def self.find_bookmarked(user)
  bookmarks = Bookmark.find(:all,
    :conditions =&gt; [&quot;bookmarkable_type = ? AND user_id = ?&quot;,&quot;Product&quot;, user.id])
  products = Array.new
  for bookmark in bookmarks
    products &lt;&lt; Product.find(bookmark.bookmarkable_id)
  end
  return products
end
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I have an add to your plugin.  the below example is for finding all the Products bookmarked by a given user_id</p>
<pre>
def self.find_bookmarked(user)
  bookmarks = Bookmark.find(:all,
    :conditions =&gt; ["bookmarkable_type = ? AND user_id = ?","Product", user.id])
  products = Array.new
  for bookmark in bookmarks
    products &lt;&lt; Product.find(bookmark.bookmarkable_id)
  end
  return products
end
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frederico Araujo</title>
		<link>http://juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/comment-page-1/#comment-185</link>
		<dc:creator>Frederico Araujo</dc:creator>
		<pubDate>Mon, 12 Feb 2007 07:46:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/#comment-185</guid>
		<description>&quot;post.add_bookmark bmark&quot; did not work,

I had to do:

&quot;post.bookmarks &lt;&lt; bmark&quot;</description>
		<content:encoded><![CDATA[<p>&#8220;post.add_bookmark bmark&#8221; did not work,</p>
<p>I had to do:</p>
<p>&#8220;post.bookmarks &lt;&lt; bmark&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

