Class: Nuntius::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_routeObject



11
12
13
14
# File 'lib/generators/nuntius/install_generator.rb', line 11

def add_route
  return if Rails.application.routes.routes.detect { |route| route.app.app == Nuntius::Engine }
  route %(mount Nuntius::Engine => "/nuntius")
end

#copy_migrationsObject



16
17
18
# File 'lib/generators/nuntius/install_generator.rb', line 16

def copy_migrations
  rake "nuntius:install:migrations"
end

#create_initializer_fileObject



7
8
9
# File 'lib/generators/nuntius/install_generator.rb', line 7

def create_initializer_file
  template "config/initializers/nuntius.rb"
end

#tailwindcss_configObject



20
21
22
# File 'lib/generators/nuntius/install_generator.rb', line 20

def tailwindcss_config
  rake "nuntius:tailwindcss:config"
end