Class: Sequel::Generators::ModelGenerator
- Defined in:
- lib/generators/sequel/model/model_generator.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#create_migration_file ⇒ Object
15 16 17 18 |
# File 'lib/generators/sequel/model/model_generator.rb', line 15 def create_migration_file return unless [:migration] migration_template "migration.rb", "db/migrate/create_#{table_name}.rb" end |
#create_model_file ⇒ Object
20 21 22 |
# File 'lib/generators/sequel/model/model_generator.rb', line 20 def create_model_file template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb") end |