Class: Nuntius::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Nuntius::InstallGenerator
- Defined in:
- lib/generators/nuntius/install_generator.rb
Instance Method Summary collapse
- #add_route ⇒ Object
- #copy_migrations ⇒ Object
- #create_initializer_file ⇒ Object
- #tailwindcss_config ⇒ Object
Instance Method Details
#add_route ⇒ Object
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_migrations ⇒ Object
16 17 18 |
# File 'lib/generators/nuntius/install_generator.rb', line 16 def copy_migrations rake "nuntius:install:migrations" end |
#create_initializer_file ⇒ Object
7 8 9 |
# File 'lib/generators/nuntius/install_generator.rb', line 7 def create_initializer_file template "config/initializers/nuntius.rb" end |
#tailwindcss_config ⇒ Object
20 21 22 |
# File 'lib/generators/nuntius/install_generator.rb', line 20 def tailwindcss_config rake "nuntius:tailwindcss:config" end |