Class: Koi::AdminViewsGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Koi::AdminViewsGenerator
- Includes:
- Rails::Generators::ResourceHelpers
- Defined in:
- lib/generators/koi/admin_views/admin_views_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_view_files ⇒ Object
18 19 20 21 22 23 |
# File 'lib/generators/koi/admin_views/admin_views_generator.rb', line 18 def copy_view_files available_views.each do |filename| target = filename.gsub("record", singular_name) template filename, File.join("app/views/admin", controller_file_path, target) end end |
#create_root_folder ⇒ Object
14 15 16 |
# File 'lib/generators/koi/admin_views/admin_views_generator.rb', line 14 def create_root_folder empty_directory File.join("app/views/admin", controller_file_path) end |