pundit: convert notes to pundit.

This commit is contained in:
evazion
2020-03-20 18:03:01 -05:00
parent 2c4c29b81a
commit 62835ac9fc
3 changed files with 31 additions and 29 deletions
+13
View 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