Sha256: 160e4bf50e3770fb3bed748217258569c8b219ef7f588abb4fa7ee831299e215
Contents?: true
Size: 864 Bytes
Versions: 4
Compression:
Stored size: 864 Bytes
Contents
# frozen_string_literal: true module Wallaby class Engine # `wallaby:engine:partials` generator class PartialsGenerator < Rails::Generators::NamedBase source_root File.expand_path('../../../../../', __dir__) argument :name, type: :string, default: 'admin' # @see https://github.com/wallaby-rails/wallaby/blob/master/lib/generators/wallaby/engine/partials/USAGE 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 end end end
Version data entries
4 entries across 4 versions & 1 rubygems