Class: Scribo::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Scribo::InstallGenerator
- Defined in:
- lib/generators/scribo/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
9 10 11 12 |
# File 'lib/generators/scribo/install_generator.rb', line 9 def add_route return if Rails.application.routes.routes.detect { |route| route.app.app == Scribo::Engine } route %(mount Scribo::Engine => "/scribo") end |
#copy_migrations ⇒ Object
14 15 16 |
# File 'lib/generators/scribo/install_generator.rb', line 14 def copy_migrations rake "scribo:install:migrations" end |
#create_initializer_file ⇒ Object
5 6 7 |
# File 'lib/generators/scribo/install_generator.rb', line 5 def create_initializer_file template "config/initializers/scribo.rb" end |
#tailwindcss_config ⇒ Object
18 19 20 |
# File 'lib/generators/scribo/install_generator.rb', line 18 def tailwindcss_config rake "scribo:tailwindcss:config" end |