From e51824a34587314948d16cdeccf85e0e3e9fd1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Wed, 26 Jun 2024 23:50:27 +0800 Subject: [PATCH] Fix admin redirect_to url_helper path. --- app/controllers/admin/galleries_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/galleries_controller.rb b/app/controllers/admin/galleries_controller.rb index f91d34f..8a108f3 100644 --- a/app/controllers/admin/galleries_controller.rb +++ b/app/controllers/admin/galleries_controller.rb @@ -143,7 +143,7 @@ class Admin::GalleriesController < OrbitAdminController rescue => e puts e.inspect end - redirect_to :controller=> 'images' ,:action => 'crop_process' + redirect_to admin_galleries_crop_process_path end def save_crop @@ -198,7 +198,7 @@ class Admin::GalleriesController < OrbitAdminController rescue => e puts e.inspect end - redirect_url = "/admin/galleries/crop_process" + redirect_url = admin_galleries_crop_process_path render :json => {'href' => redirect_url}.to_json end def call_translate @@ -301,7 +301,7 @@ class Admin::GalleriesController < OrbitAdminController params_album_setting = params.require(:album_setting).permit! end AlbumSetting.first.update_attributes(params_album_setting) - redirect_to '/admin/galleries' + redirect_to admin_galleries_path end def setting @album_setting = AlbumSetting.first @@ -638,7 +638,7 @@ class Admin::GalleriesController < OrbitAdminController end update_children_image_tag(album,tagsToDestroy,tagsToAdd) album.update_attributes(album_params) - redirect_to "/admin/galleries/"+album.id.to_s + redirect_to admin_gallery_path(album.id) end def update_children_image_tag(album,tagsToDestroy,tagsToAdd)