class Wallaby::Engine::PartialsGenerator

‘wallaby:engine:partials` generator

Public Instance Methods

install() click to toggle source

@see github.com/wallaby-rails/wallaby/blob/master/lib/generators/wallaby/engine/partials/USAGE

# File lib/generators/wallaby/engine/partials/partials_generator.rb, line 11
def install
  destination_prefix = "app/views/#{file_name}/application"
  %w[
    _footer _frontend _logo _navs _title _user_menu
    _index_actions _index_filters _index_pagination _index_query _resource_navs
  ].each do |name|
    copy_file(
      "#{source_paths.first}/app/views/wallaby/resources/#{name}.html.erb",
      "#{destination_prefix}/#{name}.html.erb"
    )
  end
end