Fix deprecated render text.

This commit is contained in:
BoHung Chiu 2023-09-21 12:46:38 +08:00
parent bfdba12891
commit d39a4461b3
1 changed files with 2 additions and 2 deletions

View File

@ -143,7 +143,7 @@ class Admin::AnnouncementsController < OrbitAdminController
uids = iframe_params['member_ids'].to_a.map{|m_id| MemberProfile.find(m_id).uid rescue nil}.select{|uid| !uid.nil?} uids = iframe_params['member_ids'].to_a.map{|m_id| MemberProfile.find(m_id).uid rescue nil}.select{|uid| !uid.nil?}
url_params = iframe_params.except(:member_ids) url_params = iframe_params.except(:member_ids)
url_params['uids'] = uids if uids != [] url_params['uids'] = uids if uids != []
render :text => '/xhr/panel/announcement/widget/sync_data?'+url_params.to_param render :plain => '/xhr/panel/announcement/widget/sync_data?'+url_params.to_param
end end
def settings def settings
@setting = @announcement_setting @setting = @announcement_setting
@ -544,7 +544,7 @@ class Admin::AnnouncementsController < OrbitAdminController
bulletin.is_preview = true bulletin.is_preview = true
bulletin.save bulletin.save
#BulletinFeed.create_feed_cache(bulletin) #BulletinFeed.create_feed_cache(bulletin)
render :text=>page_for_bulletin(bulletin) + "?preview=true" render :plain=>page_for_bulletin(bulletin) + "?preview=true"
end end
def get_preview_action def get_preview_action
bulletin = Bulletin.find_by(:uid=>params['uid']) bulletin = Bulletin.find_by(:uid=>params['uid'])