Class: Locomotive::SnippetPolicy

Inherits:
ApplicationPolicy show all
Defined in:
app/policies/locomotive/snippet_policy.rb

Instance Attribute Summary

Attributes inherited from ApplicationPolicy

#membership, #resource

Instance Method Summary collapse

Methods inherited from ApplicationPolicy

#edit?, #initialize, #new?, #persisted?, #show?, #site_admin?, #site_admin_or_designer?, #site_staff?, #super_admin?

Constructor Details

This class inherits a constructor from Locomotive::ApplicationPolicy

Instance Method Details

#create?Boolean

Returns:



8
9
10
# File 'app/policies/locomotive/snippet_policy.rb', line 8

def create?
  site_admin_or_designer?
end

#destroy?Boolean

Returns:



16
17
18
# File 'app/policies/locomotive/snippet_policy.rb', line 16

def destroy?
  site_admin_or_designer?
end

#destroy_all?Boolean

Returns:



20
21
22
# File 'app/policies/locomotive/snippet_policy.rb', line 20

def destroy_all?
  site_admin_or_designer?
end

#index?Boolean

Returns:



4
5
6
# File 'app/policies/locomotive/snippet_policy.rb', line 4

def index?
  site_admin_or_designer?
end

#update?Boolean

Returns:



12
13
14
# File 'app/policies/locomotive/snippet_policy.rb', line 12

def update?
  site_admin_or_designer?
end