Qwaiter in the green 💚

This commit is contained in:
2013-12-22 15:20:14 +01:00
parent 76c2d4ddbc
commit 69132b0c07
20 changed files with 150 additions and 935 deletions
@@ -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