<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: model code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 29 Aug 2008 20:01:32 GMT</pubDate>
    <description>DZone Snippets: model code</description>
    <item>
      <title>Model from Table Name</title>
      <link>http://snippets.dzone.com/posts/show/3020</link>
      <description>Get the Rails model based on the table name.  Assumes standard table name conventions.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;def model_for_table(table_name)&lt;br /&gt;  table_name.classify.constantize&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 20 Nov 2006 06:52:43 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3020</guid>
      <author>dcmanges (Dan Manges)</author>
    </item>
  </channel>
</rss>
