padrino/padrino-framework — pull request #1182 by chiastolite (2013-03-25 17:42:04+00:00)
Title: Format ar migrate

using activerecord

~~~sh
$ padrino g model bar title:string description:text
~~~

before: unformatted...

~~~ruby
class CreateFoos < ActiveRecord::Migration
def self.up
create_table :foos do |t|
t.string :title
t.text :description
t.timestamps
end
end

def self.down
drop_table :foos
end
end
~~~

after: formatted!

~~~ruby
class CreateFoos < ActiveRecord::Migration
def self.up
create_table :foos do |t|
t.string :title
t.text :description
t.timestamps
end
end

def self.down
drop_table :foos
end
end
~~~