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