Class: PagePolicy
Instance Attribute Summary
Attributes inherited from Policy
#record, #user
Instance Method Summary
collapse
Methods inherited from Policy
collection, for, #initialize, member
#create?, #destroy?, #index, #update?
Constructor Details
This class inherits a constructor from Policy
Instance Method Details
#calendar? ⇒ Boolean
8
9
10
|
# File 'app/policies/page_policy.rb', line 8
def calendar?
index?
end
|
40
41
42
|
# File 'app/policies/page_policy.rb', line 40
def delete_meta_image?
edit?
end
|
#deleted? ⇒ Boolean
12
13
14
|
# File 'app/policies/page_policy.rb', line 12
def deleted?
index?
end
|
#edit2? ⇒ Boolean
32
33
34
|
# File 'app/policies/page_policy.rb', line 32
def edit2?
edit?
end
|
#edit? ⇒ Boolean
28
29
30
|
# File 'app/policies/page_policy.rb', line 28
def edit?
user&.role?(:pages)
end
|
#index? ⇒ Boolean
4
5
6
|
# File 'app/policies/page_policy.rb', line 4
def index?
true
end
|
#move? ⇒ Boolean
36
37
38
|
# File 'app/policies/page_policy.rb', line 36
def move?
edit?
end
|
#new? ⇒ Boolean
20
21
22
|
# File 'app/policies/page_policy.rb', line 20
def new?
user&.role?(:pages)
end
|
#search? ⇒ Boolean
16
17
18
|
# File 'app/policies/page_policy.rb', line 16
def search?
index?
end
|
#show? ⇒ Boolean
24
25
26
|
# File 'app/policies/page_policy.rb', line 24
def show?
true
end
|