- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
foxweb 04.02.2015 17:13 # +9