Sha256: f2ba1c1fcea0046ee019fd5f6de750e295fab81356c9afa1db12c91459351878

Contents?: true

Size: 626 Bytes

Versions: 6

Compression:

Stored size: 626 Bytes

Contents

module Stationed
  module Generators
    module Plugins
      module Kaminari
        def self.prepended(base)
          base.class_option :kaminari,
            type: :boolean,
            default: true,
            desc: 'Include Kaminari with config and views for pagination'
        end

        def finish_template
          return super unless options[:kaminari]
          gem 'kaminari'
          super
        end

        def run_bundle
          super
          return unless options[:kaminari]
          generate 'kaminari:config'
          generate 'kaminari:views default'
        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/kaminari.rb
stationed-0.5.0 lib/stationed/generators/plugins/kaminari.rb
stationed-0.4.0 lib/stationed/generators/plugins/kaminari.rb
stationed-0.3.0 lib/stationed/generators/plugins/kaminari.rb
stationed-0.2.0 lib/stationed/generators/plugins/kaminari.rb
stationed-0.1.0 lib/stationed/generators/plugins/kaminari.rb