web/mooctracker_rails/app/controllers/students_controller.rb
#On POST request to /students it creates a student with sent data
On POST request to /students it creates a student with sent data
On POST request to / students it creates a student with sent data
def create
    @student = current_user.students.build(student_params)
    if @student.save
      render json: @student
    else
      @student_items = []
    end
  end
def create @student = current_user . students . build ( student_params ) if @student . save render json : @student else @student_items = [ ] end end
On POST request to /students it creates a student with sent data
On POST request to / students it creates a student with sent data