<?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: Rails Single Table Inheritance</title>
	<atom:link href="http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/feed/" rel="self" type="application/rss+xml" />
	<link>http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/</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: Geek Mama » Blog Archive » The TYPE Column</title>
		<link>http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/comment-page-1/#comment-2110</link>
		<dc:creator>Geek Mama » Blog Archive » The TYPE Column</dc:creator>
		<pubDate>Fri, 14 Aug 2009 20:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/#comment-2110</guid>
		<description>[...] to get the most out of your table relationships at guides.rubyonrails.org.  And I ran across a post by Techknow that does a great job of describing Single Table [...]</description>
		<content:encoded><![CDATA[<p>[...] to get the most out of your table relationships at guides.rubyonrails.org.  And I ran across a post by Techknow that does a great job of describing Single Table [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cookie</title>
		<link>http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/comment-page-1/#comment-821</link>
		<dc:creator>Cookie</dc:creator>
		<pubDate>Tue, 21 Jul 2009 10:04:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/#comment-821</guid>
		<description>Can we put all the inherited models in the same file along with the parent class? When I try to do model.singularize.classify.constantize, I get a &quot;Uninitialized contant model&quot;. Weird thing is, it works okay on the console, but not when I run the app. Thanks</description>
		<content:encoded><![CDATA[<p>Can we put all the inherited models in the same file along with the parent class? When I try to do model.singularize.classify.constantize, I get a &#8220;Uninitialized contant model&#8221;. Weird thing is, it works okay on the console, but not when I run the app. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jolmash</title>
		<link>http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/comment-page-1/#comment-62</link>
		<dc:creator>Jolmash</dc:creator>
		<pubDate>Sat, 13 Jun 2009 20:33:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/#comment-62</guid>
		<description>I have some question, I&#039;d thank you guys if you can help me, I have the same question than Pratik: how do you handle custom attributes for each role? I wouldn&#039;t like to have one table per role. another question is: could the type column be replaced by a dynamic attribute in the model? thanks in advance</description>
		<content:encoded><![CDATA[<p>I have some question, I&#8217;d thank you guys if you can help me, I have the same question than Pratik: how do you handle custom attributes for each role? I wouldn&#8217;t like to have one table per role. another question is: could the type column be replaced by a dynamic attribute in the model? thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pratik</title>
		<link>http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/comment-page-1/#comment-61</link>
		<dc:creator>Pratik</dc:creator>
		<pubDate>Sun, 07 Jun 2009 21:06:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/#comment-61</guid>
		<description>Thanks for the information. Can i create a separate table for Administrator and Editor if i want to store custom attributes. I mean the attributes for Administrator and Editor which are not generic and cannot be fitted into the User model.</description>
		<content:encoded><![CDATA[<p>Thanks for the information. Can i create a separate table for Administrator and Editor if i want to store custom attributes. I mean the attributes for Administrator and Editor which are not generic and cannot be fitted into the User model.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: don</title>
		<link>http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/comment-page-1/#comment-60</link>
		<dc:creator>don</dc:creator>
		<pubDate>Thu, 26 Mar 2009 09:24:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/#comment-60</guid>
		<description>The Administrator model can inherit from either Editor or User. If it inherits from Editor, it has all of the privileges of Editor, so it makes more sense to inherit from it.</description>
		<content:encoded><![CDATA[<p>The Administrator model can inherit from either Editor or User. If it inherits from Editor, it has all of the privileges of Editor, so it makes more sense to inherit from it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mitch</title>
		<link>http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/comment-page-1/#comment-59</link>
		<dc:creator>mitch</dc:creator>
		<pubDate>Tue, 24 Mar 2009 04:03:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/#comment-59</guid>
		<description>Hi. Thanks for the post.

One point: Shouldn&#039;t your Administrator model inherit from User? It is inheriting from Editor in your example.</description>
		<content:encoded><![CDATA[<p>Hi. Thanks for the post.</p>
<p>One point: Shouldn&#8217;t your Administrator model inherit from User? It is inheriting from Editor in your example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LG</title>
		<link>http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/comment-page-1/#comment-58</link>
		<dc:creator>LG</dc:creator>
		<pubDate>Mon, 23 Mar 2009 17:45:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/#comment-58</guid>
		<description>It looks like to_xml does weird stuff with STI.  Consider

user = User.find(3)
puts user.class

This gives Administrator as above. However, then do

user.to_xml

It comes back looking like:


    Barb
   ...


I want to have the outer XML wrapper still be  and have administrator inside the XML as a  or something.  Any way to do that without writing a substitute to_xml function?

TIA</description>
		<content:encoded><![CDATA[<p>It looks like to_xml does weird stuff with STI.  Consider</p>
<p>user = User.find(3)<br />
puts user.class</p>
<p>This gives Administrator as above. However, then do</p>
<p>user.to_xml</p>
<p>It comes back looking like:</p>
<p>    Barb<br />
   &#8230;</p>
<p>I want to have the outer XML wrapper still be  and have administrator inside the XML as a  or something.  Any way to do that without writing a substitute to_xml function?</p>
<p>TIA</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adit</title>
		<link>http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/comment-page-1/#comment-57</link>
		<dc:creator>adit</dc:creator>
		<pubDate>Thu, 27 Nov 2008 06:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/#comment-57</guid>
		<description>thank&#039;s for the explain

i just realize STI in ruby on rails is very simple, and the part i like is, it don&#039;t need to create additional table, just create additional model</description>
		<content:encoded><![CDATA[<p>thank&#8217;s for the explain</p>
<p>i just realize STI in ruby on rails is very simple, and the part i like is, it don&#8217;t need to create additional table, just create additional model</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 4 Essential &#38; 7 Optional Ruby on Rails Tutorials &#171; BendTheBlock</title>
		<link>http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/comment-page-1/#comment-56</link>
		<dc:creator>4 Essential &#38; 7 Optional Ruby on Rails Tutorials &#171; BendTheBlock</dc:creator>
		<pubDate>Thu, 24 Jul 2008 14:00:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/#comment-56</guid>
		<description>[...] 6. OO Inheritance (RoR supports Single Table Inheritance) - &lt;a href=&quot;http://www.juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/&quot; rel=&quot;nofollow&quot;&gt;Rails Single Table Inheritance&lt;/a&gt;[...]</description>
		<content:encoded><![CDATA[<p>[...] 6. OO Inheritance (RoR supports Single Table Inheritance) &#8211; <a href="http://www.juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/" rel="nofollow">Rails Single Table Inheritance</a>[...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chemica</title>
		<link>http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/comment-page-1/#comment-55</link>
		<dc:creator>Chemica</dc:creator>
		<pubDate>Fri, 14 Dec 2007 15:24:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/#comment-55</guid>
		<description>Crisp, clear and to the point. Ever thought of writing for the RoR Wiki? ;)</description>
		<content:encoded><![CDATA[<p>Crisp, clear and to the point. Ever thought of writing for the RoR Wiki? ;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

