<?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: Has Many Through Association</title>
	<atom:link href="http://www.infused.org/2005/12/06/has-many-through-association/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.infused.org/2005/12/06/has-many-through-association/</link>
	<description></description>
	<lastBuildDate>Wed, 19 Aug 2009 08:02:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nitish</title>
		<link>http://www.infused.org/2005/12/06/has-many-through-association/comment-page-1/#comment-22538</link>
		<dc:creator>Nitish</dc:creator>
		<pubDate>Fri, 12 Sep 2008 11:57:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/?p=322#comment-22538</guid>
		<description>Hi, Can you please post an example of how I can create a User, a Newsletter and a Subscription all at the same time?
Is it needed to have a Subscriptions controller for this?

Thanks,
Nitish</description>
		<content:encoded><![CDATA[<p>Hi, Can you please post an example of how I can create a User, a Newsletter and a Subscription all at the same time?<br />
Is it needed to have a Subscriptions controller for this?</p>
<p>Thanks,<br />
Nitish</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Poli</title>
		<link>http://www.infused.org/2005/12/06/has-many-through-association/comment-page-1/#comment-16455</link>
		<dc:creator>Poli</dc:creator>
		<pubDate>Wed, 26 Dec 2007 18:00:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/?p=322#comment-16455</guid>
		<description>Hello, I want to know if that is good for my aplicattion, I have three tables in mysql;
the first is Person, the second is  Friend, and the third is persons_friends

These tables has :
has_and_belong_to_many for relationship

Then, I have a fourth table that is related with persons_friends; 
I don&#039;t know how to do a relationship between the fourth table and persons_friends

Poli</description>
		<content:encoded><![CDATA[<p>Hello, I want to know if that is good for my aplicattion, I have three tables in mysql;<br />
the first is Person, the second is  Friend, and the third is persons_friends</p>
<p>These tables has :<br />
has_and_belong_to_many for relationship</p>
<p>Then, I have a fourth table that is related with persons_friends;<br />
I don&#8217;t know how to do a relationship between the fourth table and persons_friends</p>
<p>Poli</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flip&#8217;s &#187; has_and_belongs_to_many-Beziehung (habtm) mit zusÃ¤tzlichen Attributen</title>
		<link>http://www.infused.org/2005/12/06/has-many-through-association/comment-page-1/#comment-15004</link>
		<dc:creator>flip&#8217;s &#187; has_and_belongs_to_many-Beziehung (habtm) mit zusÃ¤tzlichen Attributen</dc:creator>
		<pubDate>Sun, 19 Aug 2007 10:14:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/?p=322#comment-15004</guid>
		<description>[...] Die habtm-Funktionalit&#228;t in Rails ist f&#252;r n:m-Beziehungen gedacht. Was aber, wenn jede dieser Beziehungen zus&#228;tzliche Attribute mit sich bringen soll? Beispiel: ein User soll Teil verschiedener Gruppen sein k&#246;nnen und einer Gruppe sollen mehrere User angeh&#246;ren k&#246;nnen. Um dies umzusetzen, ist die habtm-Beziehung perfekt. Nun soll aber zus&#228;tzlich jeder User einer Gruppe eine Rolle inne habe, z.B. User 1 hat in Gruppe 1 die Rolle &#8220;admin&#8221;, in Gruppe 2 &#8220;member&#8221; etc. Hierf&#252;r bietet sich sich eine &#8220;has_many through&#8221; an. Weiteres unter http://www.infused.org/2005/12/06/has-many-through-association/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Die habtm-Funktionalit&#228;t in Rails ist f&#252;r n:m-Beziehungen gedacht. Was aber, wenn jede dieser Beziehungen zus&#228;tzliche Attribute mit sich bringen soll? Beispiel: ein User soll Teil verschiedener Gruppen sein k&#246;nnen und einer Gruppe sollen mehrere User angeh&#246;ren k&#246;nnen. Um dies umzusetzen, ist die habtm-Beziehung perfekt. Nun soll aber zus&#228;tzlich jeder User einer Gruppe eine Rolle inne habe, z.B. User 1 hat in Gruppe 1 die Rolle &#8220;admin&#8221;, in Gruppe 2 &#8220;member&#8221; etc. Hierf&#252;r bietet sich sich eine &#8220;has_many through&#8221; an. Weiteres unter <a href="http://www.infused.org/2005/12/06/has-many-through-association/" rel="nofollow">http://www.infused.org/2005/12/06/has-many-through-association/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CindiDevBlog &#187; Blog Archive &#187; additional fields in habtm-relations</title>
		<link>http://www.infused.org/2005/12/06/has-many-through-association/comment-page-1/#comment-7513</link>
		<dc:creator>CindiDevBlog &#187; Blog Archive &#187; additional fields in habtm-relations</dc:creator>
		<pubDate>Mon, 18 Sep 2006 15:16:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/?p=322#comment-7513</guid>
		<description>[...] Links zum Thema:  rubyonrails.com::wiki::ThroughAssociations matthewman.net/&#8230;/activerecord-goes-through api.rubyonrails.org/&#8230;/ActiveRecord/&#8230;/ClassMethods wiki.rubyonrails.org/&#8230;/PolymorphicAssociations infused.org/&#8230;/has-many-through-association gmane.comp.lang.ruby.rails blog.hasmanythrough.com/&#8230;/associations blog.hasmanythrough.com/../many-to-many-dance-off wiki.rubyonrails.org/&#8230;/Beginner+Howto+on+has_many+through [...]</description>
		<content:encoded><![CDATA[<p>[...] Links zum Thema:  rubyonrails.com::wiki::ThroughAssociations matthewman.net/&#8230;/activerecord-goes-through api.rubyonrails.org/&#8230;/ActiveRecord/&#8230;/ClassMethods wiki.rubyonrails.org/&#8230;/PolymorphicAssociations infused.org/&#8230;/has-many-through-association gmane.comp.lang.ruby.rails blog.hasmanythrough.com/&#8230;/associations blog.hasmanythrough.com/../many-to-many-dance-off wiki.rubyonrails.org/&#8230;/Beginner+Howto+on+has_many+through [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike at SEOG.net</title>
		<link>http://www.infused.org/2005/12/06/has-many-through-association/comment-page-1/#comment-7085</link>
		<dc:creator>Mike at SEOG.net</dc:creator>
		<pubDate>Fri, 21 Jul 2006 19:14:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/?p=322#comment-7085</guid>
		<description>What is helpful about it is the additional aspects you can add when you flush out the model like that. You can say when a subscription was created, who created it, and so forth. By making the model of subscriptions it is easier to add functionality that is often wanted by marketing and business folks.  Although he was talking about cases where the subscription model wasn&#039;t defined, where it was simply a many to many relationship. Joining things with the has many :through and creating a new model allows one to stay &quot;CRUD&quot;-y and the benefits that comes along with that.</description>
		<content:encoded><![CDATA[<p>What is helpful about it is the additional aspects you can add when you flush out the model like that. You can say when a subscription was created, who created it, and so forth. By making the model of subscriptions it is easier to add functionality that is often wanted by marketing and business folks.  Although he was talking about cases where the subscription model wasn&#8217;t defined, where it was simply a many to many relationship. Joining things with the has many :through and creating a new model allows one to stay &#8220;CRUD&#8221;-y and the benefits that comes along with that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BeepHONK rumbles to life&#8230; at 72mach1.com</title>
		<link>http://www.infused.org/2005/12/06/has-many-through-association/comment-page-1/#comment-5504</link>
		<dc:creator>BeepHONK rumbles to life&#8230; at 72mach1.com</dc:creator>
		<pubDate>Thu, 13 Apr 2006 02:52:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/?p=322#comment-5504</guid>
		<description>[...] I&#8217;ve got most of the initial featureset roughed in. It&#8217;s even got some sprinklings of AJAX and DOM JavaScript effects. I&#8217;ve got a problem with the :through relationships that came about somewhere between the 1.0 and 1.1 release of Rails. Never fear though I&#8217;ll get it working soon enough. [...]</description>
		<content:encoded><![CDATA[<p>[...] I&#8217;ve got most of the initial featureset roughed in. It&#8217;s even got some sprinklings of AJAX and DOM JavaScript effects. I&#8217;ve got a problem with the :through relationships that came about somewhere between the 1.0 and 1.1 release of Rails. Never fear though I&#8217;ll get it working soon enough. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edoardo "Dado" Marcora</title>
		<link>http://www.infused.org/2005/12/06/has-many-through-association/comment-page-1/#comment-5487</link>
		<dc:creator>Edoardo "Dado" Marcora</dc:creator>
		<pubDate>Tue, 14 Mar 2006 08:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/?p=322#comment-5487</guid>
		<description>I also need it for a self-referential many-to-many relationship and I also can&#039;t get it to work.</description>
		<content:encoded><![CDATA[<p>I also need it for a self-referential many-to-many relationship and I also can&#8217;t get it to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randy Schmidt</title>
		<link>http://www.infused.org/2005/12/06/has-many-through-association/comment-page-1/#comment-5471</link>
		<dc:creator>Randy Schmidt</dc:creator>
		<pubDate>Tue, 28 Feb 2006 05:17:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/?p=322#comment-5471</guid>
		<description>I think I really need this for a site I&#039;m working on, however, I need it for a self-referential many-to-many relationship and I have had no luck getting it to work. Does anybody know how I could make this work?</description>
		<content:encoded><![CDATA[<p>I think I really need this for a site I&#8217;m working on, however, I need it for a self-referential many-to-many relationship and I have had no luck getting it to work. Does anybody know how I could make this work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Morris</title>
		<link>http://www.infused.org/2005/12/06/has-many-through-association/comment-page-1/#comment-4516</link>
		<dc:creator>Peter Morris</dc:creator>
		<pubDate>Sat, 31 Dec 2005 08:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/?p=322#comment-4516</guid>
		<description></description>
		<content:encoded><![CDATA[<p>Hmmm, the original code, before the &#8220;through&#8221; could be re-written like&#8230;&#8230;</p>
<p>@users = User.find :all, :conditions =&gt; â€œname like â€˜k%â€™â€?<br />
@users.each {|u| u.subscriptions.each{|s| s.mail(u.email,s.email_format)}}</p>
<p>you could even get rid of @users and have the .each hanging off of the find.</p>
<p>You COULD do sommat like&#8230;.</p>
<p>@users = find &#8230; blah blah &#8230;<br />
@users.collect{|u| u.subscriptions.collect{|s| [u, s]}}.each{|t| t[1].mail(t[0].email, t[1].email_format)}</p>
<p>But it would be a bad idea, as you would be building an in-memory array with as many rows as you have subscriptions whos subscribers name begins with &#8216;k&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Harris</title>
		<link>http://www.infused.org/2005/12/06/has-many-through-association/comment-page-1/#comment-4362</link>
		<dc:creator>Simon Harris</dc:creator>
		<pubDate>Sun, 25 Dec 2005 23:04:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.infused.org/?p=322#comment-4362</guid>
		<description>Excellent. I look forward to it.

Cheers,

Simon

P.S. Apologies for the unformatted code. It was late and I didn&#039;t notice the list of allowable tags below :)</description>
		<content:encoded><![CDATA[<p>Excellent. I look forward to it.</p>
<p>Cheers,</p>
<p>Simon</p>
<p>P.S. Apologies for the unformatted code. It was late and I didn&#8217;t notice the list of allowable tags below :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
