1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/policies/passport_policy.rb

27 lines
412 B
Ruby
Raw Normal View History

2018-11-29 20:37:02 -05:00
# frozen_string_literal: true
class PassportPolicy < ApplicationPolicy
2018-11-29 21:29:39 -05:00
def show?
true
end
2018-11-29 23:07:45 -05:00
def create?
true
end
2018-11-29 22:51:30 -05:00
def permitted_attributes_for_create
%i[
surname given_name patronymic sex date_of_birth place_of_birth series
2018-12-01 05:15:27 -05:00
number issued_by unit_code date_of_issue
] + [
images: [],
2018-11-29 22:51:30 -05:00
]
end
2018-11-29 20:37:02 -05:00
class Scope < Scope
def resolve
scope.all
end
end
end