1
0
Fork 0

Configure permitted attributes

This commit is contained in:
Alex Kotov 2018-11-30 08:51:30 +05:00
parent 8f7e316ee0
commit 369d01f650
No known key found for this signature in database
GPG Key ID: 4E831250F47DE154
1 changed files with 11 additions and 0 deletions

View File

@ -5,6 +5,17 @@ class PassportPolicy < ApplicationPolicy
true
end
def permitted_attributes_for_create
%i[
surname given_name patronymic sex date_of_birth place_of_birth series
number issued_by unit_code date_of_issue
]
end
def permitted_attributes_for_update
%i[image]
end
class Scope < Scope
def resolve
scope.all