Sha256: 0d68f2967ec64e3e87fe401732727d091ef1aa749039f2c9e3d23f042fa52312

Contents?: true

Size: 424 Bytes

Versions: 4

Compression:

Stored size: 424 Bytes

Contents

module Extensions

  module ActiveAdmin

    module Controller

      module PerPageLambda

        def per_page
          if active_admin_config.paginate
            @per_page || if active_admin_config.per_page.try(:lambda?)
              active_admin_config.per_page.call(self)
            else
              super
            end
          else
            super
          end
        end

      end

    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_admin-extensions-0.0.4 lib/active_admin/extensions/controller/per_page_lambda.rb
active_admin-extensions-0.0.3 lib/active_admin/extensions/controller/per_page_lambda.rb
active_admin-extensions-0.0.2 lib/active_admin/extensions/controller/per_page_lambda.rb
active_admin-extensions-0.0.1 lib/active_admin/extensions/controller/per_page_lambda.rb