Sha256: ec69f5364c7a9cada5dc66d900f31c428f9b0953504d6617f3bbc2f66f25a027

Contents?: true

Size: 278 Bytes

Versions: 49

Compression:

Stored size: 278 Bytes

Contents

module ActiveAdmin
  class PagePolicy < ApplicationPolicy
    class Scope < Struct.new(:user, :scope)
      def resolve
        scope
      end
    end

    def show?
      case record.name
      when "Dashboard"
        true
      else
        false
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 8 rubygems

Version Path
activeadmin_addons-1.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_addons-1.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/active_admin/page_policy.rb
yousty-activeadmin-1.0.17.pre spec/support/templates/policies/active_admin/page_policy.rb
yousty-activeadmin-1.0.16.pre spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_addons-1.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_addons-1.0.1 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_addons-1.0.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/active_admin/page_policy.rb
yousty-activeadmin-1.0.15.pre spec/support/templates/policies/active_admin/page_policy.rb
activeadmin-1.0.0 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin-1.0.0.pre5 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin-orac-1.0.0.pre4 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin-orac-1.0.0 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin-orac-1.0.0.pre.orac spec/support/templates/policies/active_admin/page_policy.rb
yousty-activeadmin-1.0.14.pre spec/support/templates/policies/active_admin/page_policy.rb
yousty-activeadmin-1.0.13.pre spec/support/templates/policies/active_admin/page_policy.rb
yousty-activeadmin-1.0.12.pre spec/support/templates/policies/active_admin/page_policy.rb
yousty-activeadmin-1.0.11.pre spec/support/templates/policies/active_admin/page_policy.rb
yousty-activeadmin-1.0.10.pre spec/support/templates/policies/active_admin/page_policy.rb
yousty-activeadmin-1.0.9.pre spec/support/templates/policies/active_admin/page_policy.rb
yousty-activeadmin-1.0.8.pre spec/support/templates/policies/active_admin/page_policy.rb