Skip to content

Instantly share code, notes, and snippets.

@iwazer
Created September 22, 2013 03:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iwazer/6656373 to your computer and use it in GitHub Desktop.
Save iwazer/6656373 to your computer and use it in GitHub Desktop.

こういうモデルで

ActiveRecord::Schema.define(version: 20130922022806) do

  create_table "models", force: true do |t|
    t.string   "field1"
    t.string   "field2"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

end

field1だけの更新

$ curl -i -X'PUT' -H'Accept:application/json' -H'Content-Type:application/json; charset=utf-8' -d '{"model":{"field1":"c"}}' http://localhost:3000/models/1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment