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
yousty-activeadmin-1.0.7.pre spec/support/templates/policies/active_admin/page_policy.rb
yousty-activeadmin-1.0.6.pre spec/support/templates/policies/active_admin/page_policy.rb
yousty-activeadmin-1.0.5.pre spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.1.0 spec/support/templates/policies/active_admin/page_policy.rb
active_administration-0.0.3 spec/support/templates/policies/active_admin/page_policy.rb
activeadministration-0.0.2 spec/support/templates/policies/active_admin/page_policy.rb
active_administration-0.0.2 spec/support/templates/policies/active_admin/page_policy.rb
activeadministration-0.0.1 spec/support/templates/policies/active_admin/page_policy.rb
active_administration-0.0.1 spec/support/templates/policies/active_admin/page_policy.rb