IcaliaLabs/toll

View on GitHub
lib/generators/active_record/templates/migration.rb

Summary

Maintainability
A
0 mins
Test Coverage
class TollCreate<%= table_name.camelize %> < ActiveRecord::Migration
  def change
    create_table(:<%= table_name %>) do |t|
      <%= migration_data -%>
      <% attributes.each do |attribute| -%>
        t.<%= attribute.type %> :<%= attribute.name %>
      <% end -%>

      t.timestamps
    end
  end
end