Class: Koi::AdminControllerGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Koi::AdminControllerGenerator
show all
- Includes:
- Helpers::AdminGeneratorAttributes, Rails::Generators::ResourceHelpers
- Defined in:
- lib/generators/koi/admin_controller/admin_controller_generator.rb
Instance Method Summary
collapse
#collection_attribute_for, #govuk_input_for, #index_attribute_for, #index_attributes
Instance Method Details
#create_controller_files ⇒ Object
19
20
21
22
23
24
|
# File 'lib/generators/koi/admin_controller/admin_controller_generator.rb', line 19
def create_controller_files
template("controller.rb",
File.join("app/controllers",
controller_class_path,
"#{controller_file_name}_controller.rb"))
end
|
#create_spec_files ⇒ Object
26
27
28
29
30
31
|
# File 'lib/generators/koi/admin_controller/admin_controller_generator.rb', line 26
def create_spec_files
template("controller_spec.rb",
File.join("spec/requests",
controller_class_path,
"#{controller_file_name}_controller_spec.rb"))
end
|