-1

他の人の Rails プロジェクトを引き継いだのですが、HTTP リクエストについて質問があります。

HTTP リクエストを介してパラメーターを渡すことができるように思われますが、方法がわかりません。例rake routes:

PUT    /auction2s/:id(.:format)                      auction2s#update

この機能に対応していると思われるもの

# PUT /auction2s/1
  # PUT /auction2s/1.json
  def update
    @auction2 = Auction2.find(params[:id])
    print "Hello World"
    respond_to do |format|
      if @auction2.update_attributes(params[:auction2])
        format.html { redirect_to @auction2, notice: 'Auction2 was successfully updated.' }
        format.json { head :no_content }
      else
        format.html { render action: "edit" }
        format.json { render json: @auction2.errors, status: :unprocessable_entity }
      end
    end
   end

しかし、たとえば、変更する必要がある URL がわかりません。

id=18445&done=true

その機能に。

何かご意見は?関数は正しく構成されていますか? ブラウザやAJAX(私が試しているもの)ではなく、Ruby形式でリクエストを渡す必要がありますか?

4

1 に答える 1