Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -47,11 +47,13 @@ class Settings::ShopsController < ApplicationController
|
||||
# PATCH/PUT /settings/shops/1
|
||||
# PATCH/PUT /settings/shops/1.json
|
||||
def update
|
||||
|
||||
respond_to do |format|
|
||||
if @settings_shop.update(shop_params)
|
||||
if params[:display_images].present?
|
||||
params[:display_images]['image'].each do |a|
|
||||
@display_image = @settings_shop.display_images.create!(:shop_id => @shop.id, :image => a)
|
||||
params[:display_images][:image].each do |a|
|
||||
@aa = Base64.encode64(a.read)
|
||||
@display_image = @settings_shop.display_images.create!(:shop_id => @shop.id, :image => "data:image/jpeg;base64,"+@aa)
|
||||
end
|
||||
end
|
||||
format.html { redirect_to settings_shops_url, notice: 'Shop was successfully updated.' }
|
||||
|
||||
Reference in New Issue
Block a user