Sha256: 70eacd1a0d0c63b9f09ae4c0ee7500c6957586027ef83c8907b721b3507743da

Contents?: true

Size: 446 Bytes

Versions: 114

Compression:

Stored size: 446 Bytes

Contents

module Pageflow
  module Admin
    class CustomScopesRenderer < ActiveAdmin::Views::Scopes
      builder_method :custom_scopes_renderer

      def build(scopes, options = {})
        @default_scope = options.delete(:default_scope)
        super
      end

      def current_scope?(scope)
        if params[:scope]
          params[:scope] == scope.id
        else
          @default_scope.to_s == scope.id
        end
      end
    end
  end
end

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
pageflow-17.0.4 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-17.0.3 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-17.0.2 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-17.0.1 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-17.0.0 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-16.2.0 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-16.1.0 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-16.0.0 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-15.8.0 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-14.5.2 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-15.7.1 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-15.7.0 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-15.6.1 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-15.6.0 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-15.5.0 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-15.4.0 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-15.3.0 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-15.2.2 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-15.2.1 app/views/components/pageflow/admin/custom_scopes_renderer.rb
pageflow-15.2.0 app/views/components/pageflow/admin/custom_scopes_renderer.rb