Class: Rolemodel::UiComponents::FlashGenerator
- Inherits:
-
GeneratorBase
- Object
- Rails::Generators::Base
- GeneratorBase
- Rolemodel::UiComponents::FlashGenerator
- Defined in:
- lib/generators/rolemodel/ui_components/flash/flash_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_files ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/generators/rolemodel/ui_components/flash/flash_generator.rb', line 8 def generate_files say 'generating flash message partial & spec helper', :green copy_file 'app/views/application/_flash.html.slim' copy_file 'spec/support/matchers/flash_matchers.rb' insert_into_file 'app/views/layouts/application.html.slim', after: /\bbody.*\n/ do optimize_indentation <<~SLIM, 4 = render 'flash' SLIM end end |