Files
danbooru/app/policies/note_policy.rb
2020-03-20 18:03:01 -05:00

14 lines
257 B
Ruby

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