mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Moving permalink check action to enterprise controller
This commit is contained in:
@@ -53,19 +53,6 @@ module Admin
|
||||
end
|
||||
end
|
||||
|
||||
def check_permalink
|
||||
path = Rails.application.routes.recognize_path( "/#{ params[:permalink].to_s }" )
|
||||
if path && path[:controller] == "cms_content"
|
||||
respond_to do |format|
|
||||
format.js { render nothing: true, status: 200 }
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.js { render nothing: true, status: 409 }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def build_resource_with_address
|
||||
|
||||
Reference in New Issue
Block a user