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

- old
+ new

@@ -1,9 +1,17 @@ module Stationed module Generators module Plugins module Flashes + def self.prepended(base) + base.class_option :flashes, + type: :boolean, + default: true, + desc: 'Include generic flashes partial' + end + def finish_template + return super unless options[:flashes] && options[:layout] copy_file 'flashes.html.haml', 'app/views/application/_flashes.html.haml' super end end end