Class: Erb::Generators::PompidouGenerator

Inherits:
Base
  • Object
show all
Includes:
Rails::Generators::ResourceHelpers
Defined in:
lib/generators/erb/pompidou/pompidou_generator.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#copy_view_filesObject



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/generators/erb/pompidou/pompidou_generator.rb', line 18

def copy_view_files
  admin_views.each do |view|
    Array(formats).each do |format|
      filename = filename_with_extensions(view, format)
      template "admin/#{filename}", File.join("app/views/admin", controller_file_path, filename)
    end
  end
  
  public_views.each do |view|
    Array(formats).each do |format|
      filename = filename_with_extensions(view, format)
      template "public/#{filename}", File.join("app/views/public", controller_file_path, filename)
    end
  end
end

#create_root_folderObject



13
14
15
16
# File 'lib/generators/erb/pompidou/pompidou_generator.rb', line 13

def create_root_folder
  empty_directory File.join("app/views/admin", controller_file_path)
  empty_directory File.join("app/views/public", controller_file_path)
end