{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails/issues/3426","labels_url":"https://api.github.com/repos/balderdashy/sails/issues/3426/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails/issues/3426/comments","events_url":"https://api.github.com/repos/balderdashy/sails/issues/3426/events","html_url":"https://github.com/balderdashy/sails/issues/3426","id":121942291,"number":3426,"title":"\"sails generate model\" from outside of sails project directory","user":{"login":"FurkhatKasymov","id":4961905,"avatar_url":"https://avatars.githubusercontent.com/u/4961905?v=3","gravatar_id":"","url":"https://api.github.com/users/FurkhatKasymov","html_url":"https://github.com/FurkhatKasymov","followers_url":"https://api.github.com/users/FurkhatKasymov/followers","following_url":"https://api.github.com/users/FurkhatKasymov/following{/other_user}","gists_url":"https://api.github.com/users/FurkhatKasymov/gists{/gist_id}","starred_url":"https://api.github.com/users/FurkhatKasymov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FurkhatKasymov/subscriptions","organizations_url":"https://api.github.com/users/FurkhatKasymov/orgs","repos_url":"https://api.github.com/users/FurkhatKasymov/repos","events_url":"https://api.github.com/users/FurkhatKasymov/events{/privacy}","received_events_url":"https://api.github.com/users/FurkhatKasymov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-13T20:41:09Z","updated_at":"2015-12-14T12:09:28Z","closed_at":null,"body":"Let's say I'm in home directory\r\nAnd I create new sails project with:\r\n    `sail new testProject`\r\nWhen I type:\r\n    `sails generate model smth`\r\nThen I see message:\r\n    `info: Created a new model (\"Usd\") at api/models/Usd.js!`.\r\nThats create api directory with model file in my home directory. But should not. I think there should be an error, as when I try to create controller:\r\n```\r\n$ sails generate controller smth\r\nerror: Sorry, this command can only be used in the root directory of a Sails project. \r\n```\r\nMy sailsjs version 0.11.2"},"comment":{"url":"https://api.github.com/repos/balderdashy/sails/issues/comments/164421453","html_url":"https://github.com/balderdashy/sails/issues/3426#issuecomment-164421453","issue_url":"https://api.github.com/repos/balderdashy/sails/issues/3426","id":164421453,"user":{"login":"Josebaseba","id":1160665,"avatar_url":"https://avatars.githubusercontent.com/u/1160665?v=3","gravatar_id":"","url":"https://api.github.com/users/Josebaseba","html_url":"https://github.com/Josebaseba","followers_url":"https://api.github.com/users/Josebaseba/followers","following_url":"https://api.github.com/users/Josebaseba/following{/other_user}","gists_url":"https://api.github.com/users/Josebaseba/gists{/gist_id}","starred_url":"https://api.github.com/users/Josebaseba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Josebaseba/subscriptions","organizations_url":"https://api.github.com/users/Josebaseba/orgs","repos_url":"https://api.github.com/users/Josebaseba/repos","events_url":"https://api.github.com/users/Josebaseba/events{/privacy}","received_events_url":"https://api.github.com/users/Josebaseba/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T12:09:28Z","updated_at":"2015-12-14T12:09:28Z","body":"After `sails new testProject` you need to go to the project folder `cd testProject` and then `sails generate model smth` or `sails generate controller smth`"}}