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