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/membership_app_policy.rb

21 lines
442 B
Ruby

# frozen_string_literal: true
class MembershipAppPolicy < ApplicationPolicy
def show?
return false if context.guest_account.nil?
record.account == context.guest_account
end
def create?
true
end
def permitted_attributes_for_create
%i[
first_name last_name middle_name date_of_birth occupation email
phone_number telegram_username organization_membership comment
country_state_id
]
end
end