fix error when creating bulletin and news
This commit is contained in:
parent
4e1a91ed90
commit
bb154f5be6
|
@ -5,7 +5,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||
layout 'new_admin'
|
||||
|
||||
before_filter :authenticate_user!
|
||||
before_filter :only => [ :new,:create,:edit,:update] do |controller|
|
||||
before_filter :only => [ :new,:create,:edit,:update,:create] do |controller|
|
||||
controller.get_categorys('BulletinCategory')
|
||||
end
|
||||
# before_filter :for_admin_only,:only => [:]
|
||||
|
|
|
@ -76,11 +76,11 @@ class Bulletin
|
|||
# end
|
||||
|
||||
def s_title
|
||||
self.title.zh_tw
|
||||
self.title_translations[:zh_tw]
|
||||
end
|
||||
|
||||
def s_title_en
|
||||
self.title.en
|
||||
self.title_translations[:en]
|
||||
end
|
||||
|
||||
# def s_text_en
|
||||
|
|
|
@ -5,7 +5,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
|||
# before_filter :for_admin_only,:only => [:]
|
||||
# before_filter :for_app_manager,:only => [:index,:show,]
|
||||
before_filter :for_app_sub_manager,:except => [:index,:show,:get_sorted_and_filtered_news_bulletins]
|
||||
before_filter :only => [ :new,:edit,:update] do |controller|
|
||||
before_filter :only => [ :new,:edit,:update,:create] do |controller|
|
||||
controller.get_categorys('NewsBulletinCategory')
|
||||
controller.get_unit_list
|
||||
end
|
||||
|
@ -117,6 +117,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
|||
# POST /news_bulletins
|
||||
# POST /news_bulletins.xml
|
||||
def create
|
||||
get_tags
|
||||
|
||||
if params[:news_bulletin_link]
|
||||
|
||||
|
|
|
@ -101,11 +101,11 @@ class NewsBulletin
|
|||
# end
|
||||
|
||||
def s_title
|
||||
self.title.zh_tw
|
||||
self.title_translations[:zh_tw]
|
||||
end
|
||||
|
||||
def s_title_en
|
||||
self.title.en
|
||||
self.title_translations[:en]
|
||||
end
|
||||
|
||||
# def s_text_en
|
||||
|
|
Reference in New Issue