Class: Spree::ModelDecoratorGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Spree::ModelDecoratorGenerator
- Defined in:
- lib/generators/spree/model_decorator/model_decorator_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_paths ⇒ Object
7 8 9 10 11 |
# File 'lib/generators/spree/model_decorator/model_decorator_generator.rb', line 7 def self.source_paths paths = superclass.source_paths paths << File.('templates', __dir__) paths.flatten end |
Instance Method Details
#create_model_decorator_file ⇒ Object
13 14 15 |
# File 'lib/generators/spree/model_decorator/model_decorator_generator.rb', line 13 def create_model_decorator_file template 'model_decorator.rb.tt', "app/models/#{file_path}_decorator.rb" end |