Why would I want to remove some auto-generated code by some other auto-generated code that is hardly any shorter?
By the way: self.up/self.down are turned into up/down (without the self) in Rails 3.1 anyway and usually replaced with a single change method that handles both ways.
clemens —
Remark 1: The “other” auto-generated code is more flexible in some cases. If you are satisfied with the usual generator, then just stick with it!
Remark 2: That’s why I wrote “Remove some boilerplate from your Rails migrations by switching to Rails 3.1 […]”.
Comments
Why would I want to remove some auto-generated code by some other auto-generated code that is hardly any shorter?
By the way: self.up/self.down are turned into up/down (without the self) in Rails 3.1 anyway and usually replaced with a single change method that handles both ways.
Remark 1: The “other” auto-generated code is more flexible in some cases. If you are satisfied with the usual generator, then just stick with it!
Remark 2: That’s why I wrote “Remove some boilerplate from your Rails migrations by switching to Rails 3.1 […]”.
Post a comment