Class: Unsubscribe::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details



8
9
10
11
12
13
14
# File 'lib/generators/unsubscribe/install/install_generator.rb', line 8

def link_manifest_js
  inject_into_file "app/assets/config/manifest.js" do
    <<~EOF
      \n//= link unsubscribe_manifest.js
    EOF
  end
end

#mount_engineObject



16
17
18
19
20
21
22
# File 'lib/generators/unsubscribe/install/install_generator.rb', line 16

def mount_engine
  inject_into_file "config/routes.rb", after: "Rails.application.routes.draw do" do
    <<~EOF
      \n\tmount Unsubscribe::Engine => "/unsubscribe"
    EOF
  end
end