RubyFlow The Ruby and Rails community linklog

Remove some boilerplate from your Rails migrations...

…by switching to Rails 3.1 and/or using the SlimMigrations gem :D

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

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in