Class: Bookable::Generators::ResourceModelGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Bookable::Generators::ResourceModelGenerator
- Defined in:
- lib/bookable/generators/bookable/resource_model_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_resource_migration ⇒ Object
11 12 13 |
# File 'lib/bookable/generators/bookable/resource_model_generator.rb', line 11 def create_resource_migration generate "migration Create#{resource_name_camelize.pluralize} name:string" end |
#generate_resource_model ⇒ Object
7 8 9 |
# File 'lib/bookable/generators/bookable/resource_model_generator.rb', line 7 def generate_resource_model template "resource.rb", "app/models/#{resource_name_underscore.singularize}.rb" end |