Class: Satis::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_routeObject



9
10
11
12
# File 'lib/generators/satis/install_generator.rb', line 9

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

#copy_migrationsObject



14
15
16
# File 'lib/generators/satis/install_generator.rb', line 14

def copy_migrations
  rake "satis:install:migrations"
end

#create_initializer_fileObject



5
6
7
# File 'lib/generators/satis/install_generator.rb', line 5

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

#tailwindcss_configObject



18
19
20
# File 'lib/generators/satis/install_generator.rb', line 18

def tailwindcss_config
  rake "satis:tailwindcss:config"
end