Class: CouchrestModel::Generators::ModelGenerator
- Inherits:
-
Base
- Object
- Rails::Generators::NamedBase
- Base
- CouchrestModel::Generators::ModelGenerator
- Defined in:
- lib/rails/generators/couchrest_model/model/model_generator.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#create_model_file ⇒ Object
8 9 10 |
# File 'lib/rails/generators/couchrest_model/model/model_generator.rb', line 8 def create_model_file template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb") end |
#create_module_file ⇒ Object
12 13 14 15 |
# File 'lib/rails/generators/couchrest_model/model/model_generator.rb', line 12 def create_module_file return if class_path.empty? template 'module.rb', File.join('app/models', "#{class_path.join('/')}.rb") if behavior == :invoke end |