Class: Bootsaas::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Bootsaas::InstallGenerator
- Defined in:
- lib/generators/bootsaas/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_gems ⇒ Object
21 22 23 24 25 |
# File 'lib/generators/bootsaas/install_generator.rb', line 21 def add_gems append_to_file 'Gemfile' do "\ngem 'rails_12factor', group: :production" end end |
#add_padding_for_navbar ⇒ Object
27 28 29 30 31 |
# File 'lib/generators/bootsaas/install_generator.rb', line 27 def append_to_file 'app/assets/stylesheets/application.css' do "body { padding-top: 50px; }" end end |
#add_routes ⇒ Object
15 16 17 18 19 |
# File 'lib/generators/bootsaas/install_generator.rb', line 15 def add_routes insert_into_file 'config/routes.rb', :after => "Rails.application.routes.draw do" do "\n # BootSaaS routes for home page and coming soon landing page\n root 'static_pages#index'\n get 'coming_soon', to: 'static_pages#coming_soon', as: 'coming_soon'\n" end end |
#copy_assets ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/generators/bootsaas/install_generator.rb', line 6 def copy_assets directory "assets", "app/assets" directory "controllers", "app/controllers" directory "helpers", "app/helpers" directory "test", "test" directory "layouts", "app/views/layouts" directory "views", "app/views/static_pages" end |