<?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"
	>
<channel>
	<title>Comments on: Rails:join table name</title>
	<atom:link href="http://www.fromdelhi.com/2005/12/31/railsjoin-table-name/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fromdelhi.com/2005/12/31/railsjoin-table-name/</link>
	<description>Every.Dog has_a :blog</description>
	<pubDate>Sun, 05 Feb 2012 05:21:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Jeff</title>
		<link>http://www.fromdelhi.com/2005/12/31/railsjoin-table-name/#comment-4194</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Sun, 10 Jun 2007 16:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.fromdelhi.com/2005/12/31/railsjoin-table-name/#comment-4194</guid>
		<description>so how does one specify a join table, where one of the tables being joined is itself a join table?

For example, I have a table of questions, and a table of answers.  I have a join table called answers_questions.  The answers_questions table tells me which answers are possible to which questions.  However, I kept the primary key 'id' column here, because it's more efficient for me when creating user records to have a single integer reference that tells me what question and what answer they gave.

So my join table has the id column, and now I want to create another table to join user id's with the id's of their question-answer pairs.  What do I name this join table?  First glance would seem to be "answers_questions_users".  Does rails support that?

And if not, what is the conventional Rails declaration to use such a setup?

Thanks!</description>
		<content:encoded><![CDATA[<p>so how does one specify a join table, where one of the tables being joined is itself a join table?</p>
<p>For example, I have a table of questions, and a table of answers.  I have a join table called answers_questions.  The answers_questions table tells me which answers are possible to which questions.  However, I kept the primary key &#8216;id&#8217; column here, because it&#8217;s more efficient for me when creating user records to have a single integer reference that tells me what question and what answer they gave.</p>
<p>So my join table has the id column, and now I want to create another table to join user id&#8217;s with the id&#8217;s of their question-answer pairs.  What do I name this join table?  First glance would seem to be &#8220;answers_questions_users&#8221;.  Does rails support that?</p>
<p>And if not, what is the conventional Rails declaration to use such a setup?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackie</title>
		<link>http://www.fromdelhi.com/2005/12/31/railsjoin-table-name/#comment-3164</link>
		<dc:creator>jackie</dc:creator>
		<pubDate>Thu, 22 Mar 2007 01:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.fromdelhi.com/2005/12/31/railsjoin-table-name/#comment-3164</guid>
		<description>So you add one line of code. I don't think it's a big deal, and there doesn't seem to be any other ripple-through effects.  It's unfortunate that they don't mention it in the documentation that you have that option though.   I don't even remember what is...  I think :join_table_name

Just remember that when you override table names, when you use AR, it still expects you to use your model name and plural of your model name.</description>
		<content:encoded><![CDATA[<p>So you add one line of code. I don&#8217;t think it&#8217;s a big deal, and there doesn&#8217;t seem to be any other ripple-through effects.  It&#8217;s unfortunate that they don&#8217;t mention it in the documentation that you have that option though.   I don&#8217;t even remember what is&#8230;  I think :join_table_name</p>
<p>Just remember that when you override table names, when you use AR, it still expects you to use your model name and plural of your model name.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

