Class: Erb::Generators::ControllerGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/dresser/generators/erb_generator.rb

Direct Known Subclasses

Haml::Generators::ControllerGenerator

Instance Method Summary collapse

Instance Method Details

#copy_view_filesObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/dresser/generators/erb_generator.rb', line 9

def copy_view_files
  base_path = File.join("app/themes/#{Dresser.config.default_theme}/views", class_path, file_name)
  empty_directory base_path

  actions.each do |action|
    @action = action
    @path = File.join(base_path, filename_with_extensions(action))
    template filename_with_extensions(:view), @path
  end
end