pundit: convert notes to pundit.
This commit is contained in:
13
app/policies/note_policy.rb
Normal file
13
app/policies/note_policy.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class NotePolicy < ApplicationPolicy
|
||||
def revert?
|
||||
update?
|
||||
end
|
||||
|
||||
def permitted_attributes_for_create
|
||||
[:x, :y, :width, :height, :body, :post_id, :html_id]
|
||||
end
|
||||
|
||||
def permitted_attributes_for_update
|
||||
[:x, :y, :width, :height, :body]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user