Class: BlacklightDynamicSitemap::Install

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/blacklight_dynamic_sitemap/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_routesObject



7
8
9
10
11
# File 'lib/generators/blacklight_dynamic_sitemap/install_generator.rb', line 7

def add_routes
  inject_into_file 'config/routes.rb', after: "mount Blacklight::Engine => '/'" do
    "\n  mount BlacklightDynamicSitemap::Engine => '/'\n"
  end
end

#install_webpackerObject



13
14
15
16
17
# File 'lib/generators/blacklight_dynamic_sitemap/install_generator.rb', line 13

def install_webpacker
  return unless Rails.version.to_i == 6

  rake 'webpacker:install'
end