class Stenographer::Generators::InstallGenerator
Public Instance Methods
add_initializer()
click to toggle source
# File lib/generators/stenographer/install_generator.rb, line 11 def add_initializer path = "#{Rails.root}/config/initializers/stenographer.rb" if File.exist?(path) puts 'Skipping config/initializers/stenographer.rb creation, as file already exists!' else puts 'Adding Stenographer initializer (config/initializers/stenographer.rb)...' template 'config/initializers/stenographer.rb', path end end
add_migrations()
click to toggle source
# File lib/generators/stenographer/install_generator.rb, line 27 def add_migrations exec('rake stenographer:install:migrations') end
add_routes()
click to toggle source
# File lib/generators/stenographer/install_generator.rb, line 23 def add_routes route 'mount Stenographer::Engine, at: "/stenographer"' end