mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Render errors in JSON in the schedule correctly
This commit is contained in:
parent
e8261d41bc
commit
a1c7f67735
5 changed files with 32 additions and 37 deletions
|
|
@ -20,7 +20,7 @@ module Admin
|
|||
redirect_to admin_conference_program_path(@conference.short_title),
|
||||
notice: 'The program was successfully updated.'
|
||||
end
|
||||
format.js { render json: { 'status' => 'ok' } }
|
||||
format.js { render json: {} }
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
|
|
@ -28,7 +28,7 @@ module Admin
|
|||
flash[:error] = "Updating program failed. #{@program.errors.to_a.join('. ')}."
|
||||
render :new
|
||||
end
|
||||
format.js { render json: { 'status' => "The selected schedule couldn't been updated #{@program.errors.to_a.join('. ')}" } }
|
||||
format.js { render json: { errors: "The selected schedule couldn't been updated #{@program.errors.to_a.join('. ')}" }, status: 422 }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue