{"id":12405,"date":"2020-12-19T09:45:59","date_gmt":"2020-12-19T00:45:59","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=12405"},"modified":"2023-05-27T22:43:13","modified_gmt":"2023-05-27T13:43:13","slug":"%e3%80%90ruby-on-rails%e3%80%91%e3%80%8c%e3%82%a2%e3%82%bd%e3%82%b7%e3%82%a8%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3has_one%e3%80%8d%e3%81%ae%e3%82%aa%e3%83%97%e3%82%b7%e3%83%a7%e3%83%b3","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=12405","title":{"rendered":"\u3010Ruby on Rails\u3011\u300c\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3(has_one)\u300d\u3001\u300cbelongs_to\u300d\u306e\u30aa\u30d7\u30b7\u30e7\u30f3"},"content":{"rendered":"<h2>\u305d\u3082\u305d\u3082has_one\u3068\u306f\uff1f<\/h2>\n<p>\u5bfe\u8c61\u30921\u3064\u3060\u3051\u6301\u3063\u3066\u3044\u308b\u5834\u5408\u306b\u4f7f\u3046\u3002\u300c1:1\u300d\u306e\u95a2\u9023\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h2>\u601d\u60f3<\/h2>\n<p>\u4e00\u5fdc\u30011:1\u3068\u8a00\u3063\u3066\u3082\u3069\u3061\u3089\u304b\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5916\u90e8\u30ad\u30fc\u3092\u6301\u305f\u305b\u307e\u3059\u3002\u666e\u901a\u306f\u4e3b\u5f93\u95a2\u4fc2\u3092\u6301\u3064\u306e\u3067<span style=\"color: #ff0000;\"><strong>\u300c\u5f93\u300d<\/strong><strong>\u306e\u65b9\u306b\u5916\u90e8\u30ad\u30fc\u3092\u6301\u305f\u305b\u307e\u3059\u3002<\/strong><\/span><\/p>\n<h2>\u5b9a\u7fa9<\/h2>\n<h3>\u4e3b\u30e2\u30c7\u30eb\u5074\u306e\u8a2d\u5b9a<\/h3>\n<p>\u4e3b\u30e2\u30c7\u30eb\u5074\u306b\u300chas_one\u300d\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">class \u4e3b\u30e2\u30c7\u30eb\u540d &lt; ActiveRecord::Base\r\n  has_one :\u5f93\u30e2\u30c7\u30eb\uff08\u5358\u6570\u5f62\uff09\r\nend<\/pre>\n<h3>\u5f93\u30e2\u30c7\u30eb\u5074\u306e\u8a2d\u5b9a<\/h3>\n<p>\u5f93\u30e2\u30c7\u30eb\u5074\u306f\u300cbelongs_to\u300d\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">class \u5f93\u30e2\u30c7\u30eb &lt; ActiveRecord::Base\r\n    belongs_to :\u4e3b\u30e2\u30c7\u30eb(\u5358\u6570\u7cfb)\r\nend<\/pre>\n<h2>\u5b9f\u88c5<\/h2>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b\u547c\u3073\u51fa\u305b\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">\u4e3b\u30e2\u30c7\u30eb.find(1).\u5f93\u30e2\u30c7\u30eb.\u5f93\u30e2\u30c7\u30eb\u306e\u30ab\u30e9\u30e0\u540d<\/pre>\n<h2>has_one\u306e\u30aa\u30d7\u30b7\u30e7\u30f3<\/h2>\n<h2>\u6982\u8981<\/h2>\n<table style=\"width: 697px;\">\n<tbody>\n<tr>\n<th style=\"width: 73px;\">\u30aa\u30d7\u30b7\u30e7\u30f3\u540d<\/th>\n<th style=\"width: 416px;\">\u8aac\u660e<\/th>\n<th style=\"width: 114px;\">\u30c7\u30d5\u30a9\u30eb\u30c8\u5024<\/th>\n<\/tr>\n<tr>\n<td style=\"width: 73px;\">class_name<\/td>\n<td style=\"width: 416px;\">\u95a2\u9023\u3059\u308b\u30e2\u30c7\u30eb\u30af\u30e9\u30b9\u540d\u3092\u6307\u5b9a\u3002\u95a2\u9023\u540d\u3068\u53c2\u7167\u5148\u306e\u30af\u30e9\u30b9\u540d\u3092\u5206\u3051\u305f\u3044\u5834\u5408\u306b\u4f7f\u7528\u3059\u308b\u3002<span style=\"color: #ff0000;\"><strong>\u30e2\u30c7\u30eb\u540d\u3068\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u4f7f\u7528\u3057\u3066\u3044\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u540d\u304c\u7570\u306a\u308a\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u4e0a\u3067\u306e\u53ef\u8aad\u6027\u304c\u4e0b\u304c\u308b\u306e\u3067\u3042\u307e\u308a\u4f7f\u3046\u3053\u3068\u306f\u306a\u3044\u3002<\/strong><\/span><\/td>\n<td style=\"width: 114px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 73px;\">foreign_key<\/td>\n<td style=\"width: 416px;\">\u53c2\u7167\u5148\u30c6\u30fc\u30d6\u30eb\u306e\u5916\u90e8\u30ad\u30fc\u306e\u30ab\u30e9\u30e0\u540d<\/td>\n<td style=\"width: 114px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 73px;\">primary_key<\/td>\n<td style=\"width: 416px;\">\u53c2\u7167\u5143\uff08\u81ea\u5206\uff09\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u5916\u90e8\u30ad\u30fc\u306e\u30ab\u30e9\u30e0\u540d<\/td>\n<td style=\"width: 114px;\">id\u30ab\u30e9\u30e0\u304c\u9078\u3070\u308c\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 73px;\">dependent<\/td>\n<td style=\"width: 416px;\">\u89aa\u3068\u5b50\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u6307\u5b9a\u3059\u308b\u3002<\/p>\n<p>\u89aa\u3092\u524a\u9664\u3057\u305f\u969b\u306b\u89aa\u3068\u5b50\u3092\u307e\u3068\u3081\u3066\u524a\u9664\u3057\u305f\u3044\u5834\u5408\u306f\u300cdependent: :destroy\u300d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/td>\n<td style=\"width: 114px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 73px;\"><\/td>\n<td style=\"width: 416px;\"><\/td>\n<td style=\"width: 114px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 73px;\"><\/td>\n<td style=\"width: 416px;\"><\/td>\n<td style=\"width: 114px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 73px;\"><\/td>\n<td style=\"width: 416px;\"><\/td>\n<td style=\"width: 114px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 73px;\"><\/td>\n<td style=\"width: 416px;\"><\/td>\n<td style=\"width: 114px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 73px;\"><\/td>\n<td style=\"width: 416px;\"><\/td>\n<td style=\"width: 114px;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>belongs_to\u3068\u306f\uff1f<\/h2>\n<p>\u81ea\u5206\u304c\u5bfe\u8c61\u306b\u6240\u5c5e\u3057\u3066\u3044\u308b\u5834\u5408\u306b\u4f7f\u3046\u3002<\/p>\n<h3>belongs_to\u306e\u69cb\u6587<\/h3>\n<pre class=\"lang:default decode:true\">belongs_to \u89aa\u30e2\u30c7\u30eb\u540d,\u30b9\u30b3\u30fc\u30d7,\u30aa\u30d7\u30b7\u30e7\u30f3<\/pre>\n<h4>\u30b9\u30b3\u30fc\u30d7\u540d<\/h4>\n<p>\u7701\u7565\u306f\u53ef\u80fd\u3001\u4ee5\u4e0b\u306e\u69cb\u6587\u3067\u30d6\u30ed\u30c3\u30af\u3092\u6307\u5b9a\u3057\u3066\u95a2\u9023\u3065\u3051\u308b\u305f\u3081\u306b\u53d6\u308a\u51fa\u3059\u30ec\u30b3\u30fc\u30c9\u3092\u6307\u5b9a\u3067\u304d\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">-&gt; {\u30af\u30a8\u30ea\u30e1\u30bd\u30c3\u30c9}<\/pre>\n<h4>\u30aa\u30d7\u30b7\u30e7\u30f3<\/h4>\n<p>\u7701\u7565\u306f\u53ef\u80fd<\/p>\n<h4>\u5b9f\u88c5<\/h4>\n<p>\u5358\u4e00\u306e\u89aa\u30e2\u30c7\u30eb\u304c\u8fd4\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true\">\u5b50\u30e2\u30c7\u30eb.find(1).\u89aa\u30e2\u30c7\u30eb\r\n<\/pre>\n<h3>belongs_to\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6982\u8981<\/h3>\n<table style=\"width: 697px;\">\n<tbody>\n<tr>\n<th style=\"width: 88px;\">\u30aa\u30d7\u30b7\u30e7\u30f3\u540d<\/th>\n<th style=\"width: 413px;\">\u8aac\u660e<\/th>\n<th style=\"width: 102px;\">\u30c7\u30d5\u30a9\u30eb\u30c8\u5024<\/th>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\">class_model<\/td>\n<td style=\"width: 413px;\">\u95a2\u9023\u3059\u308b\u30e2\u30c7\u30eb\u30af\u30e9\u30b9\u3092\u6307\u5b9a\u3059\u308b\u3002\u95a2\u9023\u540d\u3068\u53c2\u7167\u5148\u306e\u30af\u30e9\u30b9\u540d\u3092\u5206\u3051\u305f\u3044\u5834\u5408\u306b\u4f7f\u3046\u3002\u5fc5\u305aforeign_key\u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3068\u3059\u308b\u3002<span style=\"color: #ff0000;\"><strong>\u30e2\u30c7\u30eb\u540d\u3068\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u4f7f\u7528\u3057\u3066\u3044\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u540d\u304c\u7570\u306a\u308a\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u4e0a\u3067\u306e\u53ef\u8aad\u6027\u304c\u4e0b\u304c\u308b\u306e\u3067\u3042\u307e\u308a\u4f7f\u3046\u3053\u3068\u306f\u306a\u3044\u3002<\/strong><\/span><\/td>\n<td style=\"width: 102px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\">foreign_key<\/td>\n<td style=\"width: 413px;\">\u53c2\u7167\u5148\u30c6\u30fc\u30d6\u30eb\u306e\u5916\u90e8\u30ad\u30fc\u306e\u30ab\u30e9\u30e0\u540d<\/td>\n<td style=\"width: 102px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\">primary_key<\/td>\n<td style=\"width: 413px;\">\u53c2\u7167\u5143\uff08\u81ea\u5206\uff09\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u5916\u90e8\u30ad\u30fc\u306e\u30ab\u30e9\u30e0\u540d\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u300cid\u30ab\u30e9\u30e0\u300d\u304c\u9078\u3070\u308c\u308b\u3002<\/td>\n<td style=\"width: 102px;\">id\u30ab\u30e9\u30e0\u304c\u9078\u629e\u3055\u308c\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\">optional<\/td>\n<td style=\"width: 413px;\">true\u3092\u6307\u5b9a\u3059\u308b\u3068\u53c2\u7167\u5148\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u304c\u306a\u3044\u5834\u5408\u306b\u30a8\u30e9\u30fc\u306b\u306a\u3089\u306a\u3044\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306ffalse\u306a\u306e\u3067\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002<\/td>\n<td style=\"width: 102px;\">false<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\">autosave<\/td>\n<td style=\"width: 413px;\">\u95a2\u9023\u3065\u3051\u3066\u3044\u308b\u30e2\u30c7\u30eb\u304c\u4fdd\u5b58\u3055\u308c\u308b\u5ea6\u306b\u4fdd\u5b58\u3055\u308c\u308b\u3002<\/td>\n<td style=\"width: 102px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\">counter_cache<\/td>\n<td style=\"width: 413px;\">\u30b5\u30a4\u30ba\u53d6\u5f97\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5229\u7528\u3059\u308b\u3088\u3046\u6307\u5b9a\u3059\u308b\u3002\uff08SQL\u304c\u767a\u884c\u3055\u308c\u306a\u3044\u305f\u3081\u51e6\u7406\u52b9\u7387\u304c\u4e0a\u304c\u308b\u5834\u5408\u304c\u3042\u308b\u3002\uff09<\/td>\n<td style=\"width: 102px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\">dependent<\/td>\n<td style=\"width: 413px;\">\u95a2\u9023\u3065\u3051\u3057\u3066\u3044\u308b\u30e2\u30c7\u30eb\u3067\u30ec\u30b3\u30fc\u30c9\u306e\u524a\u9664\u304c\u884c\u308f\u308c\u305f\u969b\u306b\u81ea\u52d5\u7684\u306b\u95a2\u9023\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u3092\u524a\u9664\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/td>\n<td style=\"width: 102px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\">inverse_of<\/td>\n<td style=\"width: 413px;\">\u81ea\u5206\u306e\u30e2\u30c7\u30eb\u540d\u3092\u6307\u5b9a\u3059\u308b\u3002polymophic\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u540c\u6642\u306b\u306f\u6307\u5b9a\u3067\u304d\u306a\u3044\u3002<\/td>\n<td style=\"width: 102px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\">polymorphic<\/td>\n<td style=\"width: 413px;\">\u6307\u5b9a\u3057\u305f\u30e2\u30c7\u30eb\u306b\u5f93\u5c5e\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u4efb\u610f\u306e\u6570\u306e\u30e2\u30c7\u30eb\u306b\u5f93\u5c5e\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002\u95a2\u9023\u3065\u3051\u308b\u30e2\u30c7\u30eb\u540d\u3092\u4efb\u610f\u306e\u540d\u79f0(\u30bf\u30a4\u30d7\uff09\u306b\u3059\u308b\u3053\u3068\u3067\u8907\u6570\u884c\u306ebelongs_to\u306e\u8a2d\u5b9a\u304c\u4e0d\u8981\u306b\u306a\u308b\u3002<\/td>\n<td style=\"width: 102px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\">touch<\/td>\n<td style=\"width: 413px;\">\u95a2\u9023\u3065\u3044\u3066\u3044\u308b\u30e2\u30c7\u30eb\u304c\u4fdd\u5b58\u3055\u308c\u308b\u5ea6\u306b\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u66f4\u65b0\u3059\u308b\u3002<\/td>\n<td style=\"width: 102px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\">validate<\/td>\n<td style=\"width: 413px;\">\u95a2\u9023\u3065\u3044\u3066\u3044\u308b\u30e2\u30c7\u30eb\u304c\u4fdd\u5b58\u3055\u308c\u308b\u5ea6\u306b\u5fc5\u305a\u691c\u8a3c\u3055\u308c\u308b\u3002<\/td>\n<td style=\"width: 102px;\">false<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\"><\/td>\n<td style=\"width: 413px;\"><\/td>\n<td style=\"width: 102px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 88px;\"><\/td>\n<td style=\"width: 413px;\"><\/td>\n<td style=\"width: 102px;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u8a73\u7d30<\/h3>\n<h4>dependent<\/h4>\n<h3>\u8ffd\u52a0\u3055\u308c\u308b\u30e1\u30bd\u30c3\u30c9<\/h3>\n<p>belongs_to\u95a2\u9023\u3065\u3051\u3092\u3057\u305f\u30e2\u30c7\u30eb\u306f\u4e0b\u8a18\u30e1\u30bd\u30c3\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u308b\u3002<\/p>\n<table>\n<tbody>\n<tr>\n<th>\u30e1\u30bd\u30c3\u30c9\u540d<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>\u30e2\u30c7\u30eb\u540d<\/td>\n<td>\u95a2\u9023\u3065\u3051\u3057\u3066\u3044\u308b\u30e2\u30c7\u30eb\u3092\u8fd4\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u30e2\u30c7\u30eb\u540d=(\u30e2\u30c7\u30eb)<\/td>\n<td>\u5f15\u6570\u306e\u30e2\u30c7\u30eb\u3092\u95a2\u9023\u3065\u3051\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>build_\u30e2\u30c7\u30eb\u540d(\u30ab\u30e9\u30e0\u540d\uff1a\u5024,\u30ab\u30e9\u30e0\u540d:\u5024...)<\/td>\n<td>\u30ec\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u3002\u30c6\u30fc\u30d6\u30eb\u306b\u306f\u4fdd\u5b58\u3055\u308c\u306a\u3044\u3002<\/td>\n<\/tr>\n<tr>\n<td>create_\u30e2\u30c7\u30eb\u540d(\u30ab\u30e9\u30e0\u540d\uff1a\u5024,\u30ab\u30e9\u30e0\u540d\uff1a\u5024...)<\/td>\n<td>\u30ec\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u3002\u30ab\u30e9\u30e0\u306e\u691c\u8a3c\u3092\u30d1\u30b9\u3059\u308c\u3070\u30c6\u30fc\u30d6\u30eb\u306b\u4fdd\u5b58\u3055\u308c\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>create_\u30e2\u30c7\u30eb\u540d!(\u30ab\u30e9\u30e0\u540d\uff1a\u5024,\u30ab\u30e9\u30e0\u540d\uff1a\u5024...)<\/td>\n<td>\u30ec\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u3002\u30ab\u30e9\u30e0\u306e\u691c\u8a3c\u3092\u30d1\u30b9\u3057\u306a\u3051\u308c\u3070\u4f8b\u5916\u304c\u767a\u751f\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"\u305d\u3082\u305d\u3082has_one\u3068\u306f\uff1f \u5bfe\u8c61\u30921\u3064\u3060\u3051\u6301\u3063\u3066\u3044\u308b\u5834\u5408\u306b\u4f7f\u3046\u3002\u300c1:1\u300d\u306e\u95a2\u9023\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002 \u601d\u60f3 \u4e00\u5fdc\u30011:1\u3068\u8a00\u3063\u3066\u3082\u3069\u3061\u3089\u304b\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5916\u90e8\u30ad\u30fc\u3092\u6301\u305f\u305b\u307e\u3059\u3002\u666e\u901a\u306f\u4e3b\u5f93\u95a2\u4fc2\u3092\u6301\u3064\u306e\u3067\u300c\u5f93\u300d\u306e\u65b9\u306b\u5916 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[36],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/12405"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12405"}],"version-history":[{"count":7,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/12405\/revisions"}],"predecessor-version":[{"id":20496,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/12405\/revisions\/20496"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12405"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}