Skip default redirect after matching p_fournisseur
This commit is contained in:
parent
8be2ad4ce9
commit
0c12850718
@ -599,6 +599,16 @@ class Admin::PriceDocumentsController < ApplicationController
|
|||||||
@price_document = PriceDocument.find(params[:id])
|
@price_document = PriceDocument.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def match_p_fournisseur_save
|
||||||
|
@price_document = PriceDocument.find(params[:id])
|
||||||
|
|
||||||
|
if @price_document.update_attributes(params.require(:price_document).permit!)
|
||||||
|
# redirect_back(fallback_location: price_documents_ptath)
|
||||||
|
else
|
||||||
|
render action: "edit"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def analyse_reponses
|
def analyse_reponses
|
||||||
@price_document = PriceDocument.find(params[:id])
|
@price_document = PriceDocument.find(params[:id])
|
||||||
@price_document_responses = PriceDocument.where(:doc_ref_id => @price_document.id )
|
@price_document_responses = PriceDocument.where(:doc_ref_id => @price_document.id )
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
=semantic_form_for [:admin, @price_document], :html => {:class => "qi_price_form"}, :remote => false do |f|
|
=semantic_form_for [:admin, @price_document], url: match_p_fournisseur_save_admin_price_document_path, :html => {:class => "qi_price_form"}, :remote => true do |f|
|
||||||
=diag do
|
=diag do
|
||||||
=f.object.errors.messages
|
=f.object.errors.messages
|
||||||
|
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
location.reload();
|
||||||
|
close_pane_hover();
|
Reference in New Issue
Block a user