Class: BootstrapStyleguide::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- BootstrapStyleguide::InstallGenerator
- Defined in:
- lib/generators/bootstrap_styleguide/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_routes ⇒ Object
7 8 9 10 |
# File 'lib/generators/bootstrap_styleguide/install_generator.rb', line 7 def add_routes styleguide_routes = "mount BootstrapStyleguide::Engine => '/bootstrap_styleguide'" route styleguide_routes end |
#copy_styleguide_views ⇒ Object
17 18 19 20 |
# File 'lib/generators/bootstrap_styleguide/install_generator.rb', line 17 def copy_styleguide_views styleguide_directory = File.('../../../app/views/bootstrap_styleguide', __dir__) directory styleguide_directory, 'app/views/bootstrap_styleguide' end |
#create_styleguide_layout ⇒ Object
12 13 14 15 |
# File 'lib/generators/bootstrap_styleguide/install_generator.rb', line 12 def create_styleguide_layout layout_path = File.('../../../app/views/layouts/styleguide.html.erb', __dir__) copy_file layout_path, "app/views/layouts/styleguide.html.erb" end |