Configure permitted attributes
This commit is contained in:
parent
8f7e316ee0
commit
369d01f650
|
@ -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
|
||||
|
|
Reference in New Issue