web/mooctracker_rails/app/controllers/studentcourses_controller.rb
#On POST request to /studentcourses it creates a studentcourse with sent data
On POST request to /studentcourses it creates a studentcourse with sent data
On POST request to / studentcourses it creates a studentcourse with sent data
def create
    @studentcourse = current_user.studentcourses.build(studentcourse_params)
    if @studentcourse.save
      render json: @studentcourse
    else
      @studentcourse_items = []
    end
  end
def create @studentcourse = current_user . studentcourses . build ( studentcourse_params ) if @studentcourse . save render json : @studentcourse else @studentcourse_items = [ ] end end
On POST request to /studentcourses it creates a studentcourse with sent data
On POST request to / studentcourses it creates a studentcourse with sent data