Sha256: f721ba9e2eee16d0df2c547a2a2f4782c2fcb466de941cc8236b73315bb3d70e

Contents?: true

Size: 615 Bytes

Versions: 6

Compression:

Stored size: 615 Bytes

Contents

module Stationed
  module Generators
    module Plugins
      module Draper
        def self.prepended(base)
          base.class_option :draper,
            type: :boolean,
            default: true,
            desc: 'Include and configure draper for view decorators'
        end

        def finish_template
          return super unless options[:draper]
          gem 'draper'
          copy_file 'application_decorator.rb', 'app/decorators/application_decorator.rb'
          copy_file 'paginating_decorator.rb', 'app/decorators/paginating_decorator.rb'
          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/draper.rb
stationed-0.5.0 lib/stationed/generators/plugins/draper.rb
stationed-0.4.0 lib/stationed/generators/plugins/draper.rb
stationed-0.3.0 lib/stationed/generators/plugins/draper.rb
stationed-0.2.0 lib/stationed/generators/plugins/draper.rb
stationed-0.1.0 lib/stationed/generators/plugins/draper.rb