<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>ronin: Tag rails</title>
    <link>http://blogs.divisibleprime.com/ronin/articles/tag/rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Stuff</description>
    <item>
      <title>Internet Asshattery</title>
      <description>&lt;p&gt;&lt;a href="http://randomfoo.net/blog/id/4171"&gt;Leonard Lin&lt;/a&gt;: Internet Asshattery, Armchair Scaling Experts Edition&lt;/p&gt;</description>
      <pubDate>Sat, 26 Apr 2008 11:43:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:e3e2476e-d471-4d48-80e9-f9f1e93fdc91</guid>
      <author>Kerry</author>
      <link>http://blogs.divisibleprime.com/ronin/articles/2008/04/26/internet-asshattery</link>
      <category>Rails</category>
      <category>Tech</category>
      <category>Ruby</category>
      <category>rails</category>
      <category>scaling</category>
      <category>twitter</category>
      <trackback:ping>http://blogs.divisibleprime.com/ronin/articles/trackback/943</trackback:ping>
    </item>
    <item>
      <title>Rails Scaffold, ActiveRecord, and table names</title>
      <description>&lt;p&gt;Looks like the Rails scaffolding doesn&amp;#8217;t like it when your model uses a different table name from the default mapping it expects(like when accessing a legacy database model).  &lt;/p&gt;

&lt;p&gt;So if you have a model like so:   &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class Thing &amp;lt; ActiveRecord::Base
    set_table_name "some_thing"
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then ActiveRecord will be expecting a table called &amp;#8220;some_thing&amp;#8221;, however the scaffolding generator is expecting the default, which is going to be &amp;#8220;things&amp;#8221;(or something like that since I can&amp;#8217;t be bothered actually generating a model called Thing).&lt;/p&gt;

&lt;p&gt;When running your generator you&amp;#8217;re going to end up with an error like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;error  Before updating scaffolding from new DB schema, try creating a table for your model (Thing)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Annoying as this is, you can work around it by temporarily creating the table required by the generator.  Then go ahead and drop it after the generator works.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;create table things ();
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I&amp;#8217;m not sure what longer term effects this causes, and if there is a better way then let me know.  &lt;/p&gt;</description>
      <pubDate>Mon, 21 May 2007 20:36:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:c938c10a-7670-48fd-9f76-3eb6b9cac682</guid>
      <author>Kerry</author>
      <link>http://blogs.divisibleprime.com/ronin/articles/2007/05/21/rails-scaffold-activerecord-and-table-names</link>
      <category>Rails</category>
      <category>Tech</category>
      <category>Ruby</category>
      <category>ruby</category>
      <category>rails</category>
      <category>activerecord</category>
      <trackback:ping>http://blogs.divisibleprime.com/ronin/articles/trackback/870</trackback:ping>
    </item>
    <item>
      <title>Scaling Twitter</title>
      <description>&lt;p&gt;&lt;a href="http://blog.blainebuxton.com/"&gt;Blaine Buxton&amp;#8217;s&lt;/a&gt; &lt;a href="http://www.slideshare.net/Blaine/scaling-twitter/"&gt;slides&lt;/a&gt; on scaling twitter.&lt;/p&gt;</description>
      <pubDate>Sun, 06 May 2007 18:49:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:7349a046-473e-42c9-b707-6eb92a8b1ef8</guid>
      <author>Kerry</author>
      <link>http://blogs.divisibleprime.com/ronin/articles/2007/05/06/scaling-twitter</link>
      <category>Rails</category>
      <category>Tech</category>
      <category>Ruby</category>
      <category>ruby</category>
      <category>rails</category>
      <category>scaling</category>
      <category>twitter</category>
      <trackback:ping>http://blogs.divisibleprime.com/ronin/articles/trackback/862</trackback:ping>
    </item>
    <item>
      <title>Seaside and Rails</title>
      <description>&lt;p&gt;&lt;a href="http://griddlenoise.blogspot.com/2006/03/seaside-rails-helpers-formlib-helping.html"&gt;James Shell&lt;/a&gt;:   Seaside, Rails, Helpers&amp;#8230;&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;It&#8217;s not XML, YAML, An Array or list. It doesn&#8217;t get translated into any structure like that.&lt;/p&gt;
&lt;/blockquote&gt;</description>
      <pubDate>Mon, 05 Mar 2007 22:00:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:1bc09279-c092-45b9-a097-c5c6ecb2616a</guid>
      <author>Kerry</author>
      <link>http://blogs.divisibleprime.com/ronin/articles/2007/03/05/seaside-and-rails</link>
      <category>Rails</category>
      <category>Tech</category>
      <category>Smalltalk</category>
      <category>Ruby</category>
      <category>smalltalk</category>
      <category>ruby</category>
      <category>rails</category>
      <category>seaside</category>
      <trackback:ping>http://blogs.divisibleprime.com/ronin/articles/trackback/806</trackback:ping>
    </item>
    <item>
      <title>A Rails Debugger</title>
      <description>&lt;p&gt;&lt;a href="http://gyre.bitscribe.net/"&gt;Gyre&lt;/a&gt;: simple, fast, cross-platform, web-centric, open source, and written in Ruby.&lt;/p&gt;

&lt;p&gt;Good idea, hope it works out.&lt;/p&gt;</description>
      <pubDate>Sun, 04 Feb 2007 11:14:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:b2d8a4f5-ecb1-4da1-a3de-64dac2df1d16</guid>
      <author>Kerry</author>
      <link>http://blogs.divisibleprime.com/ronin/articles/2007/02/04/a-rails-debugger</link>
      <category>Rails</category>
      <category>Tech</category>
      <category>Ruby</category>
      <category>ruby</category>
      <category>rails</category>
      <trackback:ping>http://blogs.divisibleprime.com/ronin/articles/trackback/797</trackback:ping>
    </item>
  </channel>
</rss>
