- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
def contract_params
if params[:contract][:contract_type].to_i == 1
field = :contractor_id
else
field = :legal_entity_id
end
params.require(:contract).permit(
:contract_type,
:paid_expectation,
field
)
end
Комментарии (1) RSS