zoukankan      html  css  js  c++  java
  • Ruby中使用patch HTTP方法

    Ruby中使用patch HTTP方法

    如果使用patch,在后台可以看到只更新了改动的部分;

    Started PATCH "/ads/5/update" for ::1 at 2017-04-20 20:12:40 +0800
    Processing by AdsController#update as HTML
      Parameters: {"utf8"=>"✓", "authenticity_token"=>"bOnqooQydWJaKHET09i/Kho52m2t
    7CXgPlVgkjQW4iC2v5NZIEoBtk8Va7/sB5hDmQKhFLa/q32sTAnjtQJ1Vg==", "ad"=>{"name"=>"e
    1", "description"=>"e", "price"=>"5.0", "seller_id"=>"5", "email"=>"e", "img_url
    "=>"e"}, "commit"=>"Update1", "id"=>"5"}
      Ad Load (1.0ms)  SELECT  "ads".* FROM "ads" WHERE "ads"."id" = ? LIMIT ?  [["i
    d", 5], ["LIMIT", 1]]
       (1.0ms)  begin transaction
      SQL (1.0ms)  UPDATE "ads" SET "name" = ?, "updated_at" = ? WHERE "ads"."id" =
    ?  [["name", "e1"], ["updated_at", 2017-04-20 12:12:40 UTC], ["id", 5]]
       (154.2ms)  commit transaction
    Redirected to http://localhost:3000/ads/5
    Completed 302 Found in 165ms (ActiveRecord: 157.2ms)
  • 相关阅读:
    预编译命令 #if DEBUG
    conda常用命令
    tensorflow 安装指南
    LocNET和池化理解
    同时安装cuda8和cuda9
    np.transpose
    python中List的slice用法
    书单
    训练工程
    linux 查看进程
  • 原文地址:https://www.cnblogs.com/stono/p/6740608.html
Copyright © 2011-2022 走看看