diff --git a/app/controllers/v1/learning_objects_controller.rb b/app/controllers/v1/learning_objects_controller.rb index 47809f9a5a0563862feb38b197cd386aed59d2bf..2815773e2accb1338ea36b1db9fea30d046677db 100644 --- a/app/controllers/v1/learning_objects_controller.rb +++ b/app/controllers/v1/learning_objects_controller.rb @@ -63,7 +63,7 @@ class V1::LearningObjectsController < ApplicationController # DELETE /learning_objects/1 # DELETE /learning_objects/1.json def destroy - LearningObject.destroy(@learning_object) + @learning_object.destroy render status: :ok end diff --git a/db/migrate/20170525120237_add_learning_objects_count_to_institutions.rb b/db/migrate/20170525120237_add_learning_objects_count_to_institutions.rb new file mode 100644 index 0000000000000000000000000000000000000000..e8f42351b6122341a8a1a3d00fd0860f8405bbc4 --- /dev/null +++ b/db/migrate/20170525120237_add_learning_objects_count_to_institutions.rb @@ -0,0 +1,5 @@ +class AddLearningObjectsCountToInstitutions < ActiveRecord::Migration[5.0] + def change + add_column :institutions, :learning_objects_count, :integer, default: 0 + end +end \ No newline at end of file