From 2c16e3458f5392ded7c560b0c5e2e608706005d9 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 3 Jun 2020 20:05:07 +0800 Subject: [PATCH] avoid error occured when channel title is only a String --- app/models/site_feed_annc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/site_feed_annc.rb b/app/models/site_feed_annc.rb index 0d07367..2766e90 100644 --- a/app/models/site_feed_annc.rb +++ b/app/models/site_feed_annc.rb @@ -74,7 +74,7 @@ class SiteFeedAnnc end.compact end def channel_title(locale=I18n.locale) - self[:channel_title][locale] + self[:channel_title][locale] rescue self[:channel_title] end def category Category.find(self.merge_with_category) rescue nil