Class: Pageflow::EntryTemplatePolicy Private

Inherits:
ApplicationPolicy show all
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

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.

Returns:

  • (Boolean)


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.

Returns:

  • (Boolean)


13
14
15
# File 'app/policies/pageflow/entry_template_policy.rb', line 13

def update?
  allows?(%w[publisher manager])
end