{"id":622,"date":"2012-07-10T23:41:14","date_gmt":"2012-07-10T14:41:14","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/?p=622"},"modified":"2013-06-01T09:01:12","modified_gmt":"2013-06-01T00:01:12","slug":"rails-admin%e9%9a%8e%e5%b1%a4%e3%81%a7%e3%81%aeroute%e3%83%91%e3%82%b9%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=622","title":{"rendered":"rails admin\u968e\u5c64\u3067\u306eroute\u30d1\u30b9\u8a2d\u5b9a"},"content":{"rendered":"<p>rails\u306b\u3066\u3001admin\/index \u306e\u3088\u3046\u306b\u3001\u968e\u5c64\u3092\u4f5c\u6210\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308b\u3002<br \/>\n\u3053\u306e\u5834\u5408\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u4f5c\u6210\u3067\u304d\u308b\u304c\u3001routing \u3067\u5f15\u3063\u304b\u304b\u308b\u3002<\/p>\n<p>[ruby]<br \/>\nrails generate controller admin\/index index<br \/>\n[\/ruby]<\/p>\n<p>\u3053\u306e\u5834\u5408\u3001config\/routes.rb \u306b\u3066 namespace\u3092\u4f7f\u7528\u3059\u308b\u3002<br \/>\n[ruby]<br \/>\n  namespace :admin do<br \/>\n    get &quot;index\/index&quot;<br \/>\n  end<br \/>\n[\/ruby]<\/p>\n<p>\u306f\u307e\u3063\u305f\u306e\u304c\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u30ea\u30f3\u30af\u3092\u4f5c\u6210\u3059\u308b\u3068routing\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002<br \/>\n[ruby]<br \/>\n&lt;%= link_to(&quot;\u7ba1\u7406\u753b\u9762\u3078&quot;, {:controller =&gt; index, :action =&gt; index} %&gt;<br \/>\n[\/ruby]<\/p>\n<p>\u305d\u3053\u3067\u3001\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3067\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u60c5\u5831\u3092\u8868\u793a\u3057\u3066\u307f\u308b\u3002<br \/>\n[ruby]<br \/>\n$rake routes<br \/>\nadmin_index_index GET    \/admin\/index\/index(.:format)<br \/>\n[\/ruby]<\/p>\n<p>\u305d\u306e\u307e\u307e\u4e0b\u8a18\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u304c\u3001\u307e\u305f\u30a8\u30e9\u30fc\u3002<br \/>\n[ruby]<br \/>\n&lt;%= link_to(&quot;\u7ba1\u7406\u753b\u9762\u3078&quot;, admin_index_index %&gt;<br \/>\n[\/ruby]<\/p>\n<p>\u3069\u3046\u3084\u3089\u3001\u3092\u4ed8\u3051\u308b\u3088\u3046\u3060\u3002<br \/>\n[ruby]<br \/>\n&lt;%= link_to(&quot;\u7ba1\u7406\u753b\u9762\u3078&quot;, admin_index_index_path %&gt;<br \/>\n[\/ruby]<\/p>\n<p>\u3046\u307e\u304f\u3044\u3063\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>rails\u306b\u3066\u3001admin\/index \u306e\u3088\u3046\u306b\u3001\u968e\u5c64\u3092\u4f5c\u6210\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308b\u3002 \u3053\u306e\u5834\u5408\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u4f5c\u6210\u3067\u304d\u308b\u304c\u3001routing \u3067\u5f15\u3063\u304b\u304b\u308b\u3002 [ruby] rails generate control [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[25,14,4],"tags":[],"class_list":["post-622","post","type-post","status-publish","format-standard","hentry","category-rails","category-ruby","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=622"}],"version-history":[{"count":2,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/622\/revisions"}],"predecessor-version":[{"id":1576,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/622\/revisions\/1576"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}