From 7bbd8a81f2508327cf4f8366e3879ab0467dbaad Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 27 Mar 2020 10:18:00 +0800 Subject: [PATCH] fix error --- app/helpers/announcements_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/announcements_helper.rb b/app/helpers/announcements_helper.rb index bb39a34..3ca92a0 100644 --- a/app/helpers/announcements_helper.rb +++ b/app/helpers/announcements_helper.rb @@ -33,7 +33,7 @@ module AnnouncementsHelper author = User.find(a.create_user_id).member_profile.name rescue "" desc = a.image_description desc = (desc.nil? || desc == "" ? "announcement image" : desc) - link_to_show = !a.is_external_link.to_s.empty? ? a.external_link : OrbitHelper.widget_item_url(a.to_param) + link_to_show = a.is_external_link? ? a.external_link : OrbitHelper.widget_item_url(a.to_param) target = a.is_external_link ? "_blank" : "_self" if @image_version == 'thumb' image_url = a.image.thumb.url