{"action":"created","issue":{"url":"https://api.github.com/repos/lotus/router/issues/51","labels_url":"https://api.github.com/repos/lotus/router/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/lotus/router/issues/51/comments","events_url":"https://api.github.com/repos/lotus/router/issues/51/events","html_url":"https://github.com/lotus/router/pull/51","id":68135040,"number":51,"title":"Added nested routes","user":{"login":"AlfonsoUceda","id":925961,"avatar_url":"https://avatars.githubusercontent.com/u/925961?v=3","gravatar_id":"","url":"https://api.github.com/users/AlfonsoUceda","html_url":"https://github.com/AlfonsoUceda","followers_url":"https://api.github.com/users/AlfonsoUceda/followers","following_url":"https://api.github.com/users/AlfonsoUceda/following{/other_user}","gists_url":"https://api.github.com/users/AlfonsoUceda/gists{/gist_id}","starred_url":"https://api.github.com/users/AlfonsoUceda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlfonsoUceda/subscriptions","organizations_url":"https://api.github.com/users/AlfonsoUceda/orgs","repos_url":"https://api.github.com/users/AlfonsoUceda/repos","events_url":"https://api.github.com/users/AlfonsoUceda/events{/privacy}","received_events_url":"https://api.github.com/users/AlfonsoUceda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-04-13T16:12:16Z","updated_at":"2015-04-17T08:59:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/lotus/router/pulls/51","html_url":"https://github.com/lotus/router/pull/51","diff_url":"https://github.com/lotus/router/pull/51.diff","patch_url":"https://github.com/lotus/router/pull/51.patch"},"body":"This PR adds the feature of nested routes to router:\r\n\r\n```ruby\r\nrequire 'lotus/router'\r\n\r\nrouter = Lotus::Router.new do\r\n  namespace :admin do\r\n    resources :users\r\n  end\r\n\r\n  resources :users do\r\n    resources :posts\r\n    resource :avatar\r\n  end\r\n\r\n  resource :identity do\r\n    resource :api_keys\r\n  end\r\n\r\n  resource :user do\r\n    resources :comments\r\n  end\r\n\r\n  resources :users do\r\n    resources :posts do\r\n      resources :comments\r\n    end\r\n  end\r\nend\r\n\r\nputs router.inspector\r\n\r\n#          admin_users GET, HEAD  /admin/users                   Users::Index                  \r\n#      new_admin_users GET, HEAD  /admin/users/new               Users::New                    \r\n#          admin_users POST       /admin/users                   Users::Create                 \r\n#          admin_users GET, HEAD  /admin/users/:id               Users::Show                   \r\n#     edit_admin_users GET, HEAD  /admin/users/:id/edit          Users::Edit                   \r\n#          admin_users PATCH      /admin/users/:id               Users::Update                 \r\n#          admin_users DELETE     /admin/users/:id               Users::Destroy                \r\n# users_posts_comments GET, HEAD  /users/:users_id/posts/:posts_id/comments Users::Posts::Comments::Index \r\n# new_users_posts_comments GET, HEAD  /users/:users_id/posts/:posts_id/comments/new Users::Posts::Comments::New   \r\n# users_posts_comments POST       /users/:users_id/posts/:posts_id/comments Users::Posts::Comments::Create\r\n# users_posts_comments GET, HEAD  /users/:users_id/posts/:posts_id/comments/:id Users::Posts::Comments::Show  \r\n# edit_users_posts_comments GET, HEAD  /users/:users_id/posts/:posts_id/comments/:id/edit Users::Posts::Comments::Edit  \r\n# users_posts_comments PATCH      /users/:users_id/posts/:posts_id/comments/:id Users::Posts::Comments::Update\r\n# users_posts_comments DELETE     /users/:users_id/posts/:posts_id/comments/:id Users::Posts::Comments::Destroy\r\n#          users_posts GET, HEAD  /users/:users_id/posts         Users::Posts::Index           \r\n#      new_users_posts GET, HEAD  /users/:users_id/posts/new     Users::Posts::New             \r\n#          users_posts POST       /users/:users_id/posts         Users::Posts::Create          \r\n#          users_posts GET, HEAD  /users/:users_id/posts/:id     Users::Posts::Show            \r\n#     edit_users_posts GET, HEAD  /users/:users_id/posts/:id/edit Users::Posts::Edit            \r\n#          users_posts PATCH      /users/:users_id/posts/:id     Users::Posts::Update          \r\n#          users_posts DELETE     /users/:users_id/posts/:id     Users::Posts::Destroy         \r\n#     new_users_avatar GET, HEAD  /users/:users_id/avatar/new    Users::Avatar::New            \r\n#         users_avatar POST       /users/:users_id/avatar        Users::Avatar::Create         \r\n#         users_avatar GET, HEAD  /users/:users_id/avatar        Users::Avatar::Show           \r\n#    edit_users_avatar GET, HEAD  /users/:users_id/avatar/edit   Users::Avatar::Edit           \r\n#         users_avatar PATCH      /users/:users_id/avatar        Users::Avatar::Update         \r\n#         users_avatar DELETE     /users/:users_id/avatar        Users::Avatar::Destroy        \r\n#                users GET, HEAD  /users                         Users::Index                  \r\n#            new_users GET, HEAD  /users/new                     Users::New                    \r\n#                users POST       /users                         Users::Create                 \r\n#                users GET, HEAD  /users/:id                     Users::Show                   \r\n#           edit_users GET, HEAD  /users/:id/edit                Users::Edit                   \r\n#                users PATCH      /users/:id                     Users::Update                 \r\n#                users DELETE     /users/:id                     Users::Destroy                \r\n# new_identity_api_keys GET, HEAD  /identity/:identity_id/api_keys/new Identity::ApiKeys::New        \r\n#    identity_api_keys POST       /identity/:identity_id/api_keys Identity::ApiKeys::Create     \r\n#    identity_api_keys GET, HEAD  /identity/:identity_id/api_keys Identity::ApiKeys::Show       \r\n# edit_identity_api_keys GET, HEAD  /identity/:identity_id/api_keys/edit Identity::ApiKeys::Edit       \r\n#    identity_api_keys PATCH      /identity/:identity_id/api_keys Identity::ApiKeys::Update     \r\n#    identity_api_keys DELETE     /identity/:identity_id/api_keys Identity::ApiKeys::Destroy    \r\n#         new_identity GET, HEAD  /identity/new                  Identity::New                 \r\n#             identity POST       /identity                      Identity::Create              \r\n#             identity GET, HEAD  /identity                      Identity::Show                \r\n#        edit_identity GET, HEAD  /identity/edit                 Identity::Edit                \r\n#             identity PATCH      /identity                      Identity::Update              \r\n#             identity DELETE     /identity                      Identity::Destroy             \r\n#        user_comments GET, HEAD  /user/:user_id/comments        User::Comments::Index         \r\n#    new_user_comments GET, HEAD  /user/:user_id/comments/new    User::Comments::New           \r\n#        user_comments POST       /user/:user_id/comments        User::Comments::Create        \r\n#        user_comments GET, HEAD  /user/:user_id/comments/:id    User::Comments::Show          \r\n#   edit_user_comments GET, HEAD  /user/:user_id/comments/:id/edit User::Comments::Edit          \r\n#        user_comments PATCH      /user/:user_id/comments/:id    User::Comments::Update        \r\n#        user_comments DELETE     /user/:user_id/comments/:id    User::Comments::Destroy       \r\n#             new_user GET, HEAD  /user/new                      User::New                     \r\n#                 user POST       /user                          User::Create                  \r\n#                 user GET, HEAD  /user                          User::Show                    \r\n#            edit_user GET, HEAD  /user/edit                     User::Edit                    \r\n#                 user PATCH      /user                          User::Update                  \r\n#                 user DELETE     /user                          User::Destroy \r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/lotus/router/issues/comments/93947572","html_url":"https://github.com/lotus/router/pull/51#issuecomment-93947572","issue_url":"https://api.github.com/repos/lotus/router/issues/51","id":93947572,"user":{"login":"Erol","id":20772,"avatar_url":"https://avatars.githubusercontent.com/u/20772?v=3","gravatar_id":"","url":"https://api.github.com/users/Erol","html_url":"https://github.com/Erol","followers_url":"https://api.github.com/users/Erol/followers","following_url":"https://api.github.com/users/Erol/following{/other_user}","gists_url":"https://api.github.com/users/Erol/gists{/gist_id}","starred_url":"https://api.github.com/users/Erol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Erol/subscriptions","organizations_url":"https://api.github.com/users/Erol/orgs","repos_url":"https://api.github.com/users/Erol/repos","events_url":"https://api.github.com/users/Erol/events{/privacy}","received_events_url":"https://api.github.com/users/Erol/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T08:59:47Z","updated_at":"2015-04-17T08:59:47Z","body":"Thanks again for this @AlfonsoUceda!"}}