{"action":"created","issue":{"url":"https://api.github.com/repos/nomlab/nomnichi/issues/1","labels_url":"https://api.github.com/repos/nomlab/nomnichi/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/nomlab/nomnichi/issues/1/comments","events_url":"https://api.github.com/repos/nomlab/nomnichi/issues/1/events","html_url":"https://github.com/nomlab/nomnichi/issues/1","id":110403128,"number":1,"title":"旧nomnichi_railsを参考に静的ページをrenderする仕組みを作成","user":{"login":"emi0910","id":11749627,"avatar_url":"https://avatars.githubusercontent.com/u/11749627?v=3","gravatar_id":"","url":"https://api.github.com/users/emi0910","html_url":"https://github.com/emi0910","followers_url":"https://api.github.com/users/emi0910/followers","following_url":"https://api.github.com/users/emi0910/following{/other_user}","gists_url":"https://api.github.com/users/emi0910/gists{/gist_id}","starred_url":"https://api.github.com/users/emi0910/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emi0910/subscriptions","organizations_url":"https://api.github.com/users/emi0910/orgs","repos_url":"https://api.github.com/users/emi0910/repos","events_url":"https://api.github.com/users/emi0910/events{/privacy}","received_events_url":"https://api.github.com/users/emi0910/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"kobayashi1027","id":7124058,"avatar_url":"https://avatars.githubusercontent.com/u/7124058?v=3","gravatar_id":"","url":"https://api.github.com/users/kobayashi1027","html_url":"https://github.com/kobayashi1027","followers_url":"https://api.github.com/users/kobayashi1027/followers","following_url":"https://api.github.com/users/kobayashi1027/following{/other_user}","gists_url":"https://api.github.com/users/kobayashi1027/gists{/gist_id}","starred_url":"https://api.github.com/users/kobayashi1027/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kobayashi1027/subscriptions","organizations_url":"https://api.github.com/users/kobayashi1027/orgs","repos_url":"https://api.github.com/users/kobayashi1027/repos","events_url":"https://api.github.com/users/kobayashi1027/events{/privacy}","received_events_url":"https://api.github.com/users/kobayashi1027/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-10-08T09:07:32Z","updated_at":"2015-10-16T03:57:09Z","closed_at":null,"body":"旧nomnichi_railsを参考に静的ページをrenderする仕組みを作成する\r\n"},"comment":{"url":"https://api.github.com/repos/nomlab/nomnichi/issues/comments/148594323","html_url":"https://github.com/nomlab/nomnichi/issues/1#issuecomment-148594323","issue_url":"https://api.github.com/repos/nomlab/nomnichi/issues/1","id":148594323,"user":{"login":"kobayashi1027","id":7124058,"avatar_url":"https://avatars.githubusercontent.com/u/7124058?v=3","gravatar_id":"","url":"https://api.github.com/users/kobayashi1027","html_url":"https://github.com/kobayashi1027","followers_url":"https://api.github.com/users/kobayashi1027/followers","following_url":"https://api.github.com/users/kobayashi1027/following{/other_user}","gists_url":"https://api.github.com/users/kobayashi1027/gists{/gist_id}","starred_url":"https://api.github.com/users/kobayashi1027/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kobayashi1027/subscriptions","organizations_url":"https://api.github.com/users/kobayashi1027/orgs","repos_url":"https://api.github.com/users/kobayashi1027/repos","events_url":"https://api.github.com/users/kobayashi1027/events{/privacy}","received_events_url":"https://api.github.com/users/kobayashi1027/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T03:57:09Z","updated_at":"2015-10-16T03:57:09Z","body":"旧nomnichi_railsを参考に，動的ページのレイアウトを適用しつつ静的ページをrenderする仕組みを実装した．\r\n行ったことは以下の通りである．\r\n\r\n1. app/controller/application_controller.rbに`rescue_404`というpublic_htmlディレクトリ以下の静的ページをrenderするメソッドを作成\r\n2. config/routes.rbの最後に`get '*path', to: 'application#rescue_404'`と記述し，どのルーティングにもマッチしないgetリクエスト(静的ページのgetリクエスト)があった場合，`rescue_404`を呼び出すように設定\r\n3. publicをpublic_htmlにリネーム\r\n\r\npublicディレクトリ以下に静的ページがある場合，2.のルーティングの評価がされず`rescue_404`が呼ばれないため，動的ページのレイアウトが適用されていない静的ページが表示されてしまう．\r\nこのため，3.を行い，publicディレクトリをなくした．\r\n\r\n残された課題として，以下がある．\r\n* public_html以下の不要なファイルの削除"}}