Module: Stationed::Generators::Plugins::Layout
- Included in:
- AppGenerator
- Defined in:
- lib/stationed/generators/plugins/layout.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.prepended(base) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/stationed/generators/plugins/layout.rb', line 5 def self.prepended(base) base.class_option :layout, type: :boolean, default: true, desc: 'Add a generic Haml application layout file' end |
Instance Method Details
#finish_template ⇒ Object
12 13 14 15 16 17 |
# File 'lib/stationed/generators/plugins/layout.rb', line 12 def finish_template return super unless [:layout] remove_file 'app/views/layouts/application.html.erb' copy_file 'application.html.haml', 'app/views/layouts/application.html.haml' super end |