<?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>Moves On Rails: Moving to 2.0</title>
    <link>http://www.movesonrails.com/articles/2007/10/18/moving-to-2-0</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>New ways to look at software</description>
    <item>
      <title>Moving to 2.0</title>
      <description>&lt;p&gt;Issues found so far:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Lots of small routing changes. Thank god for grep! : &lt;code&gt;addresses_path(@employee) =&gt; employee_addresses_path(@employee) &lt;/code&gt;. (Don't forget the *_url methods!)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Several plugins failed due to &lt;code&gt;extract_options_from_args!&lt;/code&gt;. This method has been replaced with the nicer: &lt;code&gt;args.extract_options!&lt;/code&gt; (i.e acts_as_paranoid, acts_as_mappable, paginating_find)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;acts_as_paranoid had minor issues: fix by replacing &lt;code&gt;construct_count_with_legacy_args&lt;/code&gt; to &lt;code&gt;construct_count_options_from_args&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ActiveResource is now part of rails core. Be sure to freeze edge twice if you are upgrading from 1.2.3 or lower. All of our libXML additions had to be redone. (this time through /patches, tnx fngtps)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Different behavior of the render method. Before you could call &lt;code&gt;render "addresses/show"&lt;/code&gt; if you wanted to, this has been changed to &lt;code&gt;render :template =&gt; "addresses/show"&lt;/code&gt;. This affects several plugins too (like rspec_on_rails)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We no longer need the mysql_tasks plugin, since this functionality is now build right in!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;redhillonrails_core has some issues with connection adapters. Apparently rails 2.0 no longer loads adapters it doesn't need. This creates some issues with the redhills plugin since it tries to include stuff in those adapters. Adding a begin/rescue block around each include solves the issue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The development environment no longer needs the &lt;code&gt;config.breakpoint_server = true&lt;/code&gt; setting.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Polymorphic models are now saved with the base class as type in external objects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Autocomplete textfields are now a plugin: &lt;code&gt;./script/plugin install auto_complete&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you have overridden the to_json methods, be sure to change that to &lt;code&gt;to_json options={}&lt;/code&gt;, else they might fail.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Migrations no longer working? Try removing duplicate names. We have two migrations with the same name (but different id) and it just skipped the first one (!)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Benefits so far:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Speed! We did expect some speed increase, but this is major! Our pdf generating stuff uses a lot of ActiveRecord and we saw decreases of more than 50% request time.&lt;/li&gt;
&lt;/ul&gt;</description>
      <pubDate>Thu, 18 Oct 2007 15:15:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:7d0e8dbf-83dc-4153-964a-88e93356d528</guid>
      <author>andre.foeken@movesonrails.com (Andre Foeken)</author>
      <link>http://www.movesonrails.com/articles/2007/10/18/moving-to-2-0</link>
      <category>Rails</category>
      <category>Ruby</category>
      <category>update</category>
      <category>2.0</category>
      <category>edge</category>
      <category>rails</category>
      <category>problems</category>
    </item>
    <item>
      <title>"Moving to 2.0" by Ladislav Martincik</title>
      <description>Should be construct_count_options_from_legacy_args(*args)</description>
      <pubDate>Tue, 19 Feb 2008 11:02:14 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:ced10610-7219-4383-bc6e-5650a6af53b5</guid>
      <link>http://www.movesonrails.com/articles/2007/10/18/moving-to-2-0#comment-222</link>
    </item>
    <item>
      <title>"Moving to 2.0" by Alex</title>
      <description>cheers for this. the migration issue exists longer. had this with 1.2.something</description>
      <pubDate>Tue, 11 Dec 2007 11:23:01 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:9aa1795f-488a-4633-b280-680ce7b75ee7</guid>
      <link>http://www.movesonrails.com/articles/2007/10/18/moving-to-2-0#comment-173</link>
    </item>
  </channel>
</rss>
