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_polymorphic-0.3.6 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.3.5 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin-1.0.0.pre4 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin-1.0.0.pre3 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.3.4 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.3.3 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.3.2 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.3.1 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.3.0 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.2.3 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.2.2 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin-1.0.0.pre2 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.2.1 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin-magicfields-0.4.2 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin-magicfields-0.4.1 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin-magicfields-0.4.0 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.2.0 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.1.2 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin_polymorphic-0.1.1 spec/support/templates/policies/active_admin/page_policy.rb
activeadmin-1.0.0.pre1 spec/support/templates/policies/active_admin/page_policy.rb