Adjust code style.

This commit is contained in:
BoHung Chiu 2023-04-24 10:44:50 +08:00
parent 20f893e5b9
commit 6a877c8e2d
1 changed files with 75 additions and 73 deletions

View File

@ -465,8 +465,10 @@ class Admin::GalleriesController < OrbitAdminController
image_title: image.title, image_title: image.title,
image_description: image.description, image_description: image.description,
image_file: { url: "http://#{request.host_with_port}#{@image_file}", image_file: { url: "http://#{request.host_with_port}#{@image_file}",
thumb: "http://#{request.host_with_port}#{image.file.thumb.to_s}"}, thumb: "http://#{request.host_with_port}#{image.file.thumb.to_s}"
image_tag_names: tags} },
image_tag_names: tags
}
end end
render :json=>JSON.pretty_generate(output) render :json=>JSON.pretty_generate(output)
@ -639,7 +641,7 @@ class Admin::GalleriesController < OrbitAdminController
end end
private private
def crop_but_no_backup image def crop_but_no_backup(image)
fname = image.file.path fname = image.file.path
extension = File.extname(fname) extension = File.extname(fname)
base_name = fname.chomp(extension) base_name = fname.chomp(extension)