web/mooctracker_rails/app/controllers/users_controller.rb
def create
    @user = current_user.users.build(user_params)

    if @user.save
      render json: @user
    else
      @user_items = []
    end
  end
#On POST request to /student it creates a user with sent data
On POST request to /student it creates a user with sent data
On POST request to / student it creates a user with sent data
def create
    @user = current_user.users.build(user_params)
    if @user.save
      render json: @user
    else
      @user_items = []
    end
  end
def create @user = current_user . users . build ( user_params ) if @user . save render json : @user else @user_items = [ ] end end
On POST request to /student it creates a user with sent data
On POST request to / student it creates a user with sent data