fix translations error for new mongoid
This commit is contained in:
parent
6ca8a557f0
commit
b1126dcf06
|
@ -69,14 +69,14 @@ class SiteFeed
|
||||||
site_feed_annc.update_remote_site_url if site_feed_annc
|
site_feed_annc.update_remote_site_url if site_feed_annc
|
||||||
end
|
end
|
||||||
def sync_data_to_annc(site_feed_annc=nil)
|
def sync_data_to_annc(site_feed_annc=nil)
|
||||||
category_title = self.category[:title] rescue {}
|
category_title = self.category.title_translations rescue {}
|
||||||
tmp_channel_title = self.channel_title_for_cache
|
tmp_channel_title = self.channel_title_for_cache
|
||||||
clone_fields =["channel_key", "merge_with_category", "remote_site_url", "feeds_model", "feeds_uid_field", "feeds_update_callback", "feeds_time_field", "feeds_update_statuses_callback"]
|
clone_fields =["channel_key", "merge_with_category", "remote_site_url", "feeds_model", "feeds_uid_field", "feeds_update_callback", "feeds_time_field", "feeds_update_statuses_callback"]
|
||||||
(site_feed_annc ? [site_feed_annc] : SiteFeedAnnc.where(:feed_id=>self.id)).each do |tmp|
|
(site_feed_annc ? [site_feed_annc] : SiteFeedAnnc.where(:feed_id=>self.id)).each do |tmp|
|
||||||
clone_fields.each do |f|
|
clone_fields.each do |f|
|
||||||
tmp.send("#{f}=", self.send(f))
|
tmp.send("#{f}=", self.send(f))
|
||||||
end
|
end
|
||||||
tmp[:feed_name] = self[:feed_name]
|
tmp[:feed_name] = self.feed_name_translations
|
||||||
tmp.category_title = category_title
|
tmp.category_title = category_title
|
||||||
tmp.channel_title = tmp_channel_title
|
tmp.channel_title = tmp_channel_title
|
||||||
tmp.save
|
tmp.save
|
||||||
|
|
Loading…
Reference in New Issue