Class: Koi::AdminViewsGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Koi::AdminViewsGenerator
show all
- Includes:
- Helpers::AdminGeneratorAttributes, Rails::Generators::ResourceHelpers
- Defined in:
- lib/generators/koi/admin_views/admin_views_generator.rb
Instance Method Summary
collapse
#collection_attribute_for, #govuk_input_for, #index_attribute_for, #index_attributes
Instance Method Details
#copy_view_files ⇒ Object
21
22
23
24
25
26
|
# File 'lib/generators/koi/admin_views/admin_views_generator.rb', line 21
def copy_view_files
available_views.each do |filename|
target = filename.gsub("record", singular_name)
template filename, File.join("app/views", controller_file_path, target)
end
end
|
#create_root_folder ⇒ Object
17
18
19
|
# File 'lib/generators/koi/admin_views/admin_views_generator.rb', line 17
def create_root_folder
empty_directory File.join("app/views", controller_file_path)
end
|