small fix for update
This commit is contained in:
parent
e132225651
commit
87e8ab8f05
|
@ -111,7 +111,7 @@ class Admin::NewsController < OrbitAdminController
|
||||||
|
|
||||||
def update
|
def update
|
||||||
uid = params[:id].split('-').last
|
uid = params[:id].split('-').last
|
||||||
news_bulletin = NewsBulletin.find_by(:uid=>uid)
|
news_bulletin = NewsBulletin.where(:uid=>uid).first rescue nil
|
||||||
news_bulletin_params[:tags] = news_bulletin_params[:tags].blank? ? [] : news_bulletin_params[:tags]
|
news_bulletin_params[:tags] = news_bulletin_params[:tags].blank? ? [] : news_bulletin_params[:tags]
|
||||||
news_bulletin_params[:email_member_ids] = news_bulletin_params[:email_member_ids].blank? ? [] : news_bulletin_params[:email_member_ids]
|
news_bulletin_params[:email_member_ids] = news_bulletin_params[:email_member_ids].blank? ? [] : news_bulletin_params[:email_member_ids]
|
||||||
|
|
||||||
|
@ -131,8 +131,6 @@ class Admin::NewsController < OrbitAdminController
|
||||||
rescue e
|
rescue e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
|
||||||
bulletin.save
|
|
||||||
end
|
end
|
||||||
news_bulletin.save
|
news_bulletin.save
|
||||||
build_email(news_bulletin)
|
build_email(news_bulletin)
|
||||||
|
|
Loading…
Reference in New Issue