Class: Sincli::Generators::ModelsAndControllers

Inherits:
Base
  • Object
show all
Defined in:
lib/sincli/generators/models_and_controllers.rb

Instance Attribute Summary

Attributes inherited from Base

#name, #options

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Sincli::Generators::Base

Instance Method Details

#generateObject



9
10
11
12
13
# File 'lib/sincli/generators/models_and_controllers.rb', line 9

def generate
  directory('models') if @options[:db]
  empty_directory('controllers')
  template('controllers/application_controller.rb.tt', 'controllers/application_controller.rb')
end