Class: Wurk::Generators::InstallGenerator

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

Overview

‘bin/rails g wurk:install` Writes a config initializer and adds a commented-out mount line to routes. The host app picks the mount path; the generator suggests /wurk.

Instance Method Summary collapse

Instance Method Details

#copy_initializerObject



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

def copy_initializer
  template "wurk.rb", "config/initializers/wurk.rb"
end

#insert_mount_lineObject



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

def insert_mount_line
  route(%(# mount Wurk::Engine => "/wurk"  # uncomment to expose the Wurk dashboard))
end