Class: Notifly::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Utils::InstanceMethods
Defined in:
lib/generators/notifly/install/install_generator.rb

Instance Method Summary collapse

Methods included from Utils::InstanceMethods

#ask_for, #display

Instance Method Details

#copy_configObject



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

def copy_config
  template 'config/initializers/notifly.rb'
  copy_file '../../../../../config/locales/en.yml', 'config/locales/notifly.en.yml'
end

#mount_engineObject



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

def mount_engine
  namespace = ask_for('Where do you want to mount Notifly?', 'notifly', namespace)
  route("mount Notifly::Engine => '/#{namespace}', as: 'notifly'")
end

#remember_to_install_migrationsObject



22
23
24
# File 'lib/generators/notifly/install/install_generator.rb', line 22

def remember_to_install_migrations
  display 'Remember to install migrations: "rake notifly:install:migrations"', :red
end