From 0931662e3cb3cea7ea19c971e0c8edbc9d2aaee2 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 12 Apr 2016 14:23:43 +0800 Subject: [PATCH] will display merged category --- app/models/site_feed.rb | 5 +++++ app/views/admin/feeds/index.html.erb | 1 + 2 files changed, 6 insertions(+) diff --git a/app/models/site_feed.rb b/app/models/site_feed.rb index 7abc2eb..0240a0a 100644 --- a/app/models/site_feed.rb +++ b/app/models/site_feed.rb @@ -13,5 +13,10 @@ class SiteFeed field :feed_uid scope :enabled, ->{where(:disabled => false)} + + + def category + Category.find(self.merge_with_category) rescue nil + end end \ No newline at end of file diff --git a/app/views/admin/feeds/index.html.erb b/app/views/admin/feeds/index.html.erb index 783c049..06ff99c 100644 --- a/app/views/admin/feeds/index.html.erb +++ b/app/views/admin/feeds/index.html.erb @@ -51,6 +51,7 @@