upgrade pat3

This commit is contained in:
2013-12-21 16:46:07 +01:00
parent b4c4a15e60
commit c6f790eccd
12 changed files with 124 additions and 80 deletions
+7 -1
View File
@@ -20,7 +20,7 @@ class SupplierController < ApplicationController
# POST /supplier/settings
def update
@supplier = current_supplier
if current_supplier.update_attributes(params[:supplier])
if current_supplier.update_attributes(supplier_params)
redirect_to supplier_root_path
else
render action: :edit
@@ -115,4 +115,10 @@ class SupplierController < ApplicationController
@order.is_delivered!
render nothing: true
end
private
def supplier_params
params.require(:supplier).permit(:name, :email, :open, :time_zone, :night_offset, :location, :lat, :lng, :offer_wifi, :wifi_ssid, :wifi_type, :wifi_password, :iens_profile)
end
end