Sha256: 113eaae95f37ba11173f113b5d9e6ec10ce7036a5b44920c0218b0dfc6c693ae
Contents?: true
Size: 649 Bytes
Versions: 2
Compression:
Stored size: 649 Bytes
Contents
require 'rails/generators/active_record/model/model_generator' module ActiveRecord module Generators class ModelGenerator 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 def generate_locale_file invoke("locale:model", [name]) if ActiveGenerator.configuration.autoload_model_generator_locale end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_generator-2.2.4 | lib/generators/rails/model_generator.rb |
active_generator-2.2.3 | lib/generators/rails/model_generator.rb |