<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>RemVee.blog</title>
    <link>http://blog.remvee.net/</link>
    <description>RemVee.blog do { |item| item.mangle }</description>
    <item>
      <title>Remco @ Safe data migrations</title>
      <link>http://blog.remvee.net/view/post/66#comment1164</link>
      <description>&lt;p&gt;Digging through commit logs I noticed I didn&amp;#8217;t even try a nested class assuming I would just reopen the original.  Actually I was so freaked by the problems my migration caused I even moved to using  SQL  for a while.  How embarrassing..  Thanks for the heads up!&lt;/p&gt;</description>
      <author>Remco</author>
      <pubDate>Thu, 10 Apr 2008 01:39:47 +0200</pubDate>
    </item>
    <item>
      <title>coderrr @ Safe data migrations</title>
      <link>http://blog.remvee.net/view/post/66#comment1162</link>
      <description>&lt;p&gt;I don&amp;#8217;t think you need to remove and redefine the class in the global scope.  You can instead just define the class inside of your migration class:&lt;/p&gt;
&lt;pre&gt;class SomeMigration &amp;lt; AR::M
  class User &amp;lt; AR::B
    has_many :roles
  end
  class Role &amp;lt; AR::B
    belongs_to :user
  end

  def self.up
    ...
    User.find(:all).each{|u| u.roles.create(...) }
  end
end&lt;/pre&gt;
&lt;p&gt;The benefit of this is that the original model class is unaffected.  Was there some case you found where this did not work?&lt;/p&gt;
&lt;p&gt;http://coderrr.wordpress.com&lt;/p&gt;</description>
      <author>coderrr</author>
      <pubDate>Wed, 09 Apr 2008 18:18:01 +0200</pubDate>
    </item>
    <item>
      <title>Marcel @ Safe data migrations</title>
      <link>http://blog.remvee.net/view/post/66#comment1161</link>
      <description>&lt;p&gt;Lol, apparently your blog supports some sort of formatting. My stylish double-dash applied a strike-through to my text&amp;#8230;&lt;/p&gt;</description>
      <author>Marcel</author>
      <pubDate>Wed, 09 Apr 2008 06:40:10 +0200</pubDate>
    </item>
    <item>
      <title>Marcel @ Safe data migrations</title>
      <link>http://blog.remvee.net/view/post/66#comment1160</link>
      <description>&lt;p&gt;Nice (and useful!) abstraction applied in our last project (where Remco came up with this when we were dealing with lots of data migrations). &lt;br/&gt;
I&amp;#8217;m sure this little piece of code has &amp;#8212; and, in the future, will &amp;#8212; save me a lot of trouble. Thanks!&lt;/p&gt;</description>
      <author>Marcel</author>
      <pubDate>Wed, 09 Apr 2008 06:39:06 +0200</pubDate>
    </item>
  </channel>
</rss>
