refactor(contact): builtin piece jointe attachment
This commit is contained in:
parent
4b6d3ee16d
commit
e415c79ade
1 changed files with 1 additions and 3 deletions
|
@ -20,9 +20,7 @@ class ContactController < ApplicationController
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
form_params = contact_form_params
|
@form = ContactForm.new(contact_form_params)
|
||||||
@form = ContactForm.new(form_params.except(:piece_jointe))
|
|
||||||
@form.piece_jointe.attach(form_params[:piece_jointe]) if form_params[:piece_jointe].present?
|
|
||||||
@form.user = current_user
|
@form.user = current_user
|
||||||
|
|
||||||
if @form.save
|
if @form.save
|
||||||
|
|
Loading…
Reference in a new issue