Class: Ingoweiss::ScaffoldControllerGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Ingoweiss::ScaffoldControllerGenerator
show all
- Includes:
- ScopeHelpers
- Defined in:
- lib/generators/ingoweiss/scaffold_controller/scaffold_controller_generator.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#instance_variable_scope, #scope, #scope_prefix, #scoped?, #singleton?, #unscoped?
Class Method Details
.source_root ⇒ Object
11
12
13
|
# File 'lib/generators/ingoweiss/scaffold_controller/scaffold_controller_generator.rb', line 11
def self.source_root
@source_root ||= File.expand_path('../templates', __FILE__)
end
|
Instance Method Details
#generate_controller ⇒ Object
15
16
17
|
# File 'lib/generators/ingoweiss/scaffold_controller/scaffold_controller_generator.rb', line 15
def generate_controller
template 'controller.erb', "app/controllers/#{scoped_controller_plural_name}_controller.rb"
end
|
#generate_views ⇒ Object
19
20
21
|
# File 'lib/generators/ingoweiss/scaffold_controller/scaffold_controller_generator.rb', line 19
def generate_views
invoke 'ingoweiss:scaffold_views'
end
|