Qwaiter in the green 💚
This commit is contained in:
@@ -42,7 +42,7 @@ module Admin
|
||||
# POST /suppliers
|
||||
# POST /suppliers.json
|
||||
def create
|
||||
@supplier = Supplier.new(params[:supplier])
|
||||
@supplier = Supplier.new(supplier_params)
|
||||
|
||||
respond_to do |format|
|
||||
if @supplier.save
|
||||
@@ -61,7 +61,7 @@ module Admin
|
||||
@supplier = Supplier.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
if @supplier.update_attributes(params[:supplier])
|
||||
if @supplier.update_attributes(supplier_params)
|
||||
format.html { redirect_to [:admin, @supplier], notice: t('action.update.successfull', model: Supplier.model_name.human) }
|
||||
format.json { head :no_content }
|
||||
else
|
||||
@@ -89,5 +89,9 @@ module Admin
|
||||
@suppliers = Supplier.all
|
||||
@lists = List.all
|
||||
end
|
||||
|
||||
def supplier_params
|
||||
params.require(:supplier).permit!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user