method
create_migration_file
v4.0.2 -
Show latest stable
- Class:
ActiveRecord::Generators::ModelGenerator
create_migration_file()public
No documentation available.
# File activerecord/lib/rails/generators/active_record/model/model_generator.rb, line 15
def create_migration_file
return unless options[:migration] && options[:parent].nil?
attributes.each { |a| a.attr_options.delete(:index) if a.reference? && !a.has_index? } if options[:indexes] == false
migration_template "../../migration/templates/create_table_migration.rb", "db/migrate/create_#{table_name}.rb"
end