Class: DashboardPolicy

Inherits:
Struct
  • Object
show all
Defined in:
app/policies/dashboard_policy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dashboardObject

Returns the value of attribute dashboard

Returns:

  • (Object)

    the current value of dashboard



1
2
3
# File 'app/policies/dashboard_policy.rb', line 1

def dashboard
  @dashboard
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



1
2
3
# File 'app/policies/dashboard_policy.rb', line 1

def user
  @user
end

Instance Method Details

#index?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'app/policies/dashboard_policy.rb', line 2

def index?
  admin? || editor? || contributor?
end