{"id":7115,"date":"2021-08-12T09:21:35","date_gmt":"2021-08-12T00:21:35","guid":{"rendered":"https:\/\/yumishin.com\/?p=7115"},"modified":"2021-08-12T09:21:35","modified_gmt":"2021-08-12T00:21:35","slug":"resources-resource","status":"publish","type":"post","link":"https:\/\/yumishin.com\/?p=7115","title":{"rendered":"\u3010Rails\u3011resources\u3068resource\u306e\u9055\u3044"},"content":{"rendered":"<p>\u3069\u3046\u3082\u3001resources\u3068resource\u306e\u9055\u3044\u3092\u3088\u304f\u308f\u304b\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u8abf\u3079\u307e\u3057\u305f\u3002<\/p>\n<h2 id=\"i-0\">\u3010Rails\u3011resources\u3068resource\u306e\u9055\u3044<\/h2>\n<h3 id=\"i-1\">\u7d50\u8ad6<\/h3>\n<p>resources\u3068\u9055\u3063\u3066\u3001resource\u306f\u2026<\/p>\n<ul>\n<li>index\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u304c\u4f5c\u6210\u3055\u308c\u306a\u3044<\/li>\n<li>id\u4ed8\u304d\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u304c\u4f5c\u6210\u3055\u308c\u306a\u3044<\/li>\n<\/ul>\n<p>\u3068\u308a\u3042\u3048\u305a\u5206\u304b\u3089\u306a\u3051\u308c\u3070\u3001resources\u3092\u4f7f\u3063\u3066\u304a\u3051\u3070\u826f\u3044\u3093\u3067\u306f\uff1f\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h3 id=\"i-2\">\u3061\u3087\u3063\u3068\u8a73\u3057\u304f<\/h3>\n<p>resources\u3068resource\u3067\u306f\u3001\u4f5c\u3089\u308c\u308b\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u304c\u9055\u3044\u307e\u3059\u3002<\/p>\n<div class=\"pre_tag\"><span><i class=\"fa fa-code\"><\/i> resources\u306e\u5834\u5408<\/span><\/p>\n<pre><code>Prefix Verb         URI Pattern            Controller#Action\n    posts GET    \/posts(.:format)          posts#index\n          POST   \/posts(.:format)          posts#create\n new_post GET    \/posts\/new(.:format)      posts#new\nedit_post GET    \/posts\/:id\/edit(.:format) posts#edit\n     post GET    \/posts\/:id(.:format)      posts#show\n          PATCH  \/posts\/:id(.:format)      posts#update\n          PUT    \/posts\/:id(.:format)      posts#update\n          DELETE \/posts\/:id(.:format)      posts#destroy<\/code><\/pre>\n<\/div>\n<div class=\"pre_tag\"><span><i class=\"fa fa-code\"><\/i> resource\u306e\u5834\u5408<\/span><\/p>\n<pre><code>Prefix Verb         URI Pattern         Controller#Action\nnew_posts  GET    \/posts\/new(.:format)  posts#new\nedit_posts GET    \/posts\/edit(.:format) posts#edit\n     posts GET    \/posts(.:format)      posts#show\n           PATCH  \/posts(.:format)      posts#update\n           PUT    \/posts(.:format)      posts#update\n           DELETE \/posts(.:format)      posts#destroy\n           POST   \/posts(.:format)      posts#create<\/code><\/pre>\n<\/div>\n<p>\u4f5c\u3089\u308c\u308b\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u898b\u3066\u3082\u3089\u3048\u308c\u3070\u308f\u304b\u308a\u307e\u3059\u304c\u3002resource\u306e\u65b9\u306f\u3001resources\u3068\u9055\u3063\u3066\u3001ID\u306e\u5165\u3063\u305f\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u304c\u306a\u3044\u3067\u3059\u3002\u3042\u3068Index\u30da\u30fc\u30b8\u3082\u306a\u3044\u3067\u3059\u3002<\/p>\n<p>\u3058\u3083\u3042\u3069\u3093\u306a\u6642\u306bresource\u3063\u3066\u4f7f\u3046\u306e\uff1f\u3063\u3066\u8a71\u306a\u306e\u3067\u3059\u304c\u3001\u7d50\u8ad6\u3092\u8a00\u3046\u3068\u8907\u6570\u4eba\u3067\u4f7f\u3046\u4e88\u5b9a\u306e\u306a\u3044\u30da\u30fc\u30b8\u3092\u4f5c\u6210\u3059\u308b\u6642\u3067\u3059\u306d\u3002<\/p>\n<p>Rails\u3067\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306bID\u3092\u632f\u3063\u3066\u3044\u308b\u7406\u7531\u306f\u3001\u8907\u6570\u4eba\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<p>\u3067\u3059\u304c\u3001\u81ea\u5206\u3060\u3051\u4f7f\u3048\u308c\u3070\u554f\u984c\u306a\u3044\u30da\u30fc\u30b8\u3082\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u81ea\u5206\u306e\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3092\u7d39\u4ecb\u3059\u308b\u305f\u3081\u306b\u4f5c\u6210\u3057\u305f\u30a2\u30d7\u30ea\u306a\u3069\u3067\u3059\u3002<\/p>\n<p>\u305d\u3093\u306a\u6642\u306f\u3001\u8907\u6570\u4eba\u3067\u4f7f\u3046\u308f\u3051\u3067\u306f\u306a\u3044\u306e\u3067\u3001resource\u3067\u5341\u5206\u3067\u3059\u3088\u3068\u3044\u3046\u8a71\u3067\u3059\u304b\u306d\u3002\u306f\u3044\u3002\u4ee5\u4e0a\u3067\u3059\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3046\u3082\u3001resources\u3068resource\u306e\u9055\u3044\u3092\u3088\u304f\u308f\u304b\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u8abf\u3079\u307e\u3057\u305f\u3002 \u3010Rails\u3011resources\u3068resource\u306e\u9055\u3044 \u7d50\u8ad6 resources\u3068\u9055\u3063\u3066\u3001resource\u306f\u2026 index\u306e &#8230; <\/p>\n","protected":false},"author":1,"featured_media":7116,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[256],"tags":[],"class_list":{"0":"post-7115","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-it","8":"entry"},"_links":{"self":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/7115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7115"}],"version-history":[{"count":2,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/7115\/revisions"}],"predecessor-version":[{"id":7124,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/7115\/revisions\/7124"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/media\/7116"}],"wp:attachment":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}