Class: PageflowLinkmapPage::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#install_migrationsObject



17
18
19
20
# File 'lib/generators/pageflow_linkmap_page/install/install_generator.rb', line 17

def install_migrations
  rake "pageflow_#{engine_name_suffix}:install:migrations"
  rake 'pageflow_external_links:install:migrations'
end

#mount_engineObject



13
14
15
# File 'lib/generators/pageflow_linkmap_page/install/install_generator.rb', line 13

def mount_engine
  route("mount #{engine.name}, at: '/#{engine_name_suffix}'\n")
end

#register_pluginObject



5
6
7
8
9
10
11
# File 'lib/generators/pageflow_linkmap_page/install/install_generator.rb', line 5

def register_plugin
  inject_into_file('config/initializers/pageflow.rb',
                   after: "Pageflow.configure do |config|\n") do

    "  config.plugin(Pageflow::#{engine_name_suffix.camelize}.plugin)\n"
  end
end