From b5f80a06460ca8671eda180eac8c3db2266611b5 Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 19 Nov 2020 15:12:34 +0800 Subject: [PATCH] fix remove
bug --- app/controllers/breadcrumb_widgets_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/breadcrumb_widgets_controller.rb b/app/controllers/breadcrumb_widgets_controller.rb index 5b1e849..549da60 100644 --- a/app/controllers/breadcrumb_widgets_controller.rb +++ b/app/controllers/breadcrumb_widgets_controller.rb @@ -7,10 +7,10 @@ class BreadcrumbWidgetsController < ApplicationController crumbs.each do |crumb| if crumb == "" p = Page.root - data << {"page_name" => p.name.gsub('
',''), "url" => "/?locale=#{locale.to_s}"} + data << {"page_name" => p.name.gsub(/
|
/,''), "url" => "/?locale=#{locale.to_s}"} else p = Page.where(:page_id => crumb).first - data << {"page_name" => p.name.gsub('
',''), "url" => "/#{locale.to_s}" + p.url} + data << {"page_name" => p.name.gsub(/
|
/,''), "url" => "/#{locale.to_s}" + p.url} end end {