lib/stationed/generators/plugins/layout.rb in stationed-0.0.1 vs lib/stationed/generators/plugins/layout.rb in stationed-0.1.0

- old
+ new

@@ -1,9 +1,17 @@ module Stationed module Generators module Plugins module Layout + def self.prepended(base) + base.class_option :layout, + type: :boolean, + default: true, + desc: 'Add a generic Haml application layout file' + end + def finish_template + return super unless options[:layout] remove_file 'app/views/layouts/application.html.haml' copy_file 'application.html.haml', 'app/views/layouts/application.html.haml' super end end