fix error
This commit is contained in:
parent
ae965bbb6a
commit
09121746a2
|
@ -189,7 +189,7 @@ class Admin::FeedsController < OrbitAdminController
|
||||||
def force_refresh
|
def force_refresh
|
||||||
sf = SiteFeed.find_by(:feed_uid => params[:feed_uid]) rescue nil
|
sf = SiteFeed.find_by(:feed_uid => params[:feed_uid]) rescue nil
|
||||||
if !sf.nil?
|
if !sf.nil?
|
||||||
sf.get_annc(true)
|
FeedModel::Cache.recreate_annc_cache(sf)
|
||||||
end
|
end
|
||||||
render :json => {"success" => true}.to_json
|
render :json => {"success" => true}.to_json
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,7 @@ module FeedModel
|
||||||
module Cache
|
module Cache
|
||||||
require 'active_support/concern'
|
require 'active_support/concern'
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
extend self
|
||||||
included do
|
included do
|
||||||
before_save :do_before_save
|
before_save :do_before_save
|
||||||
end
|
end
|
||||||
|
@ -11,7 +12,7 @@ module FeedModel
|
||||||
tmp = SiteFeedAnnc.new(feed_id: feed.id)
|
tmp = SiteFeedAnnc.new(feed_id: feed.id)
|
||||||
end
|
end
|
||||||
tmp[:feed_name] = feed[:feed_name]
|
tmp[:feed_name] = feed[:feed_name]
|
||||||
tmp.all_contents_for_feed = feed.get_annc
|
tmp.all_contents_for_feed = feed.get_annc(true)
|
||||||
tmp.merge_with_category = feed.merge_with_category
|
tmp.merge_with_category = feed.merge_with_category
|
||||||
tmp.channel_key = feed.channel_key
|
tmp.channel_key = feed.channel_key
|
||||||
tmp.category_title = feed.category[:title] rescue {}
|
tmp.category_title = feed.category[:title] rescue {}
|
||||||
|
|
Loading…
Reference in New Issue