Class: Pageflow::EntryTemplatePolicy Private
- Inherits:
-
ApplicationPolicy
- Object
- ApplicationPolicy
- Pageflow::EntryTemplatePolicy
- Defined in:
- app/policies/pageflow/entry_template_policy.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #create? ⇒ Boolean private
-
#initialize(user, entry_template) ⇒ EntryTemplatePolicy
constructor
private
A new instance of EntryTemplatePolicy.
- #update? ⇒ Boolean private
Constructor Details
#initialize(user, entry_template) ⇒ EntryTemplatePolicy
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of EntryTemplatePolicy.
4 5 6 7 |
# File 'app/policies/pageflow/entry_template_policy.rb', line 4 def initialize(user, entry_template) @user = user @entry_template = entry_template end |
Instance Method Details
#create? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'app/policies/pageflow/entry_template_policy.rb', line 9 def create? update? end |
#update? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 |
# File 'app/policies/pageflow/entry_template_policy.rb', line 13 def update? allows?(%w[publisher manager]) end |