Class: Pageflow::EntryTemplatePolicy
- Inherits:
-
ApplicationPolicy
- Object
- ApplicationPolicy
- Pageflow::EntryTemplatePolicy
- Defined in:
- app/policies/pageflow/entry_template_policy.rb
Instance Method Summary collapse
- #create? ⇒ Boolean
-
#initialize(user, entry_template) ⇒ EntryTemplatePolicy
constructor
A new instance of EntryTemplatePolicy.
- #update? ⇒ Boolean
Constructor Details
#initialize(user, entry_template) ⇒ EntryTemplatePolicy
Returns a new instance of EntryTemplatePolicy.
3 4 5 6 |
# File 'app/policies/pageflow/entry_template_policy.rb', line 3 def initialize(user, entry_template) @user = user @entry_template = entry_template end |
Instance Method Details
#create? ⇒ Boolean
8 9 10 |
# File 'app/policies/pageflow/entry_template_policy.rb', line 8 def create? update? end |
#update? ⇒ Boolean
12 13 14 |
# File 'app/policies/pageflow/entry_template_policy.rb', line 12 def update? allows?(%w(publisher manager)) end |