{"action":"created","issue":{"url":"https://api.github.com/repos/lotus/lotus/issues/346","labels_url":"https://api.github.com/repos/lotus/lotus/issues/346/labels{/name}","comments_url":"https://api.github.com/repos/lotus/lotus/issues/346/comments","events_url":"https://api.github.com/repos/lotus/lotus/issues/346/events","html_url":"https://github.com/lotus/lotus/pull/346","id":107719213,"number":346,"title":"Generate nested actions correctly","user":{"login":"caius","id":696,"avatar_url":"https://avatars.githubusercontent.com/u/696?v=3","gravatar_id":"","url":"https://api.github.com/users/caius","html_url":"https://github.com/caius","followers_url":"https://api.github.com/users/caius/followers","following_url":"https://api.github.com/users/caius/following{/other_user}","gists_url":"https://api.github.com/users/caius/gists{/gist_id}","starred_url":"https://api.github.com/users/caius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caius/subscriptions","organizations_url":"https://api.github.com/users/caius/orgs","repos_url":"https://api.github.com/users/caius/repos","events_url":"https://api.github.com/users/caius/events{/privacy}","received_events_url":"https://api.github.com/users/caius/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lotus/lotus/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lotus/lotus/milestones/9","html_url":"https://github.com/lotus/lotus/milestones/v0.6.0","labels_url":"https://api.github.com/repos/lotus/lotus/milestones/9/labels","id":1316658,"number":9,"title":"v0.6.0","description":"","creator":{"login":"jodosha","id":5089,"avatar_url":"https://avatars.githubusercontent.com/u/5089?v=3","gravatar_id":"","url":"https://api.github.com/users/jodosha","html_url":"https://github.com/jodosha","followers_url":"https://api.github.com/users/jodosha/followers","following_url":"https://api.github.com/users/jodosha/following{/other_user}","gists_url":"https://api.github.com/users/jodosha/gists{/gist_id}","starred_url":"https://api.github.com/users/jodosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodosha/subscriptions","organizations_url":"https://api.github.com/users/jodosha/orgs","repos_url":"https://api.github.com/users/jodosha/repos","events_url":"https://api.github.com/users/jodosha/events{/privacy}","received_events_url":"https://api.github.com/users/jodosha/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":6,"state":"open","created_at":"2015-09-21T16:07:56Z","updated_at":"2015-10-10T08:59:32Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-09-22T13:51:23Z","updated_at":"2015-10-14T00:12:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/lotus/lotus/pulls/346","html_url":"https://github.com/lotus/lotus/pull/346","diff_url":"https://github.com/lotus/lotus/pull/346.diff","patch_url":"https://github.com/lotus/lotus/pull/346.patch"},"body":"Hi!\r\n\r\nWhilst trying to generate a nested action earlier I noticed the generator doesn't consume the cli arguments correctly.\r\n\r\nGiven the command `bundle exec lotus generate action \"admin/dashboard#create\"`:\r\n\r\nCurrently in master this will pick out the controller constant as being `Admin` and the action constant as being `Dashboard`, which then generates the module `Admin::Dashboard` in `app/:name/controllers/admin/dashboard.rb`.\r\n\r\nThis PR fixes this up by only splitting that last cli argument by `#` instead of `#` and `/`, which leads to the controller being `Admin::Dashboard` & the action being `Create`. Which in turn (correctly) generates `Admin::Dashboard::Create` in `app/:name/controllers/admin/dashboard/create.rb`.\r\n\r\nTest fails against master & passes against this branch.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/lotus/lotus/issues/comments/147889285","html_url":"https://github.com/lotus/lotus/pull/346#issuecomment-147889285","issue_url":"https://api.github.com/repos/lotus/lotus/issues/346","id":147889285,"user":{"login":"joneslee85","id":135605,"avatar_url":"https://avatars.githubusercontent.com/u/135605?v=3","gravatar_id":"","url":"https://api.github.com/users/joneslee85","html_url":"https://github.com/joneslee85","followers_url":"https://api.github.com/users/joneslee85/followers","following_url":"https://api.github.com/users/joneslee85/following{/other_user}","gists_url":"https://api.github.com/users/joneslee85/gists{/gist_id}","starred_url":"https://api.github.com/users/joneslee85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joneslee85/subscriptions","organizations_url":"https://api.github.com/users/joneslee85/orgs","repos_url":"https://api.github.com/users/joneslee85/repos","events_url":"https://api.github.com/users/joneslee85/events{/privacy}","received_events_url":"https://api.github.com/users/joneslee85/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T00:12:39Z","updated_at":"2015-10-14T00:12:39Z","body":":+1: \r\n\r\ncc @AlfonsoUceda @jodosha for another round of review"}}