Sha256: 8683d614ece57cc4f0b642afec95387e4a2d58758bcb210178c643695a77cbb3

Contents?: true

Size: 504 Bytes

Versions: 6

Compression:

Stored size: 504 Bytes

Contents

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
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
stationed-0.6.0 lib/stationed/generators/plugins/flashes.rb
stationed-0.5.0 lib/stationed/generators/plugins/flashes.rb
stationed-0.4.0 lib/stationed/generators/plugins/flashes.rb
stationed-0.3.0 lib/stationed/generators/plugins/flashes.rb
stationed-0.2.0 lib/stationed/generators/plugins/flashes.rb
stationed-0.1.0 lib/stationed/generators/plugins/flashes.rb