Class: Migrant::Model
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- Migrant::Model
- Defined in:
- lib/generators/model.rb
Instance Method Summary collapse
Instance Method Details
#create_model_file ⇒ Object
9 10 11 |
# File 'lib/generators/model.rb', line 9 def create_model_file template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb") end |
#protip ⇒ Object
15 16 17 |
# File 'lib/generators/model.rb', line 15 def protip puts "\nNow, go and edit app/models/#{file_name}.rb and/or generate more models, then run 'rake db:upgrade' to generate your schema." end |