rails_upgrader
rails_upgrader copied to clipboard
Update migration class name with Rails version
rails g model User name:string
will generate migration as shown below.
class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :name
t.timestamps null: false
end
end
end
In Rails 5 the same command will generate following migration.
class CreateUsers < ActiveRecord::Migration[5.0]
def change
create_table :users do |t|
t.string :name
t.timestamps
end
end
end
hey @bronzdoc I think you mixed the title of the issue with the description of another issue here
@arielj fixed it 👍