update issue fix for nccu
This commit is contained in:
parent
fc35327d11
commit
a220e6e910
|
@ -28,8 +28,8 @@ class Admin::NewsAdminsController < OrbitAdminController
|
|||
end
|
||||
|
||||
def update
|
||||
@unit = Unit.find(params[:id])
|
||||
@unit.update_attributes(unit_params)
|
||||
@unit = Unit.find_by(:uid => params[:id].split("-").last) rescue nil
|
||||
@unit.update_attributes(unit_params) if !@unit.nil?
|
||||
|
||||
redirect_to admin_news_admins_path
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue