{"comment":{"url":"https://api.github.com/repos/bobintornado/sample-gallery-app-with-carrierwave/comments/16761235","html_url":"https://github.com/bobintornado/sample-gallery-app-with-carrierwave/commit/de4c746b1eee3dd3209f7c31c2515a7c6254fc0e#commitcomment-16761235","id":16761235,"user":{"login":"bobintornado","id":3308031,"avatar_url":"https://avatars.githubusercontent.com/u/3308031?v=3","gravatar_id":"","url":"https://api.github.com/users/bobintornado","html_url":"https://github.com/bobintornado","followers_url":"https://api.github.com/users/bobintornado/followers","following_url":"https://api.github.com/users/bobintornado/following{/other_user}","gists_url":"https://api.github.com/users/bobintornado/gists{/gist_id}","starred_url":"https://api.github.com/users/bobintornado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobintornado/subscriptions","organizations_url":"https://api.github.com/users/bobintornado/orgs","repos_url":"https://api.github.com/users/bobintornado/repos","events_url":"https://api.github.com/users/bobintornado/events{/privacy}","received_events_url":"https://api.github.com/users/bobintornado/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"de4c746b1eee3dd3209f7c31c2515a7c6254fc0e","created_at":"2016-03-18T12:20:24Z","updated_at":"2016-03-18T12:20:24Z","body":"Hey @valerioleo , it's a great question, actually you could use just one controller and it will still work perfectly fine.\r\n \r\nHere I am using this nested resources to clearly & explicitly tell fellow programmers who may need to read and modify the codes later that I have some `images` under `gallery`, so that it could make their lives easier. \r\n\r\nAnd use two controller gives you more separation of concerns, more flexibility, and more fine grind of control, so in general it's a good practice. \r\n\r\nFurthermore, `routes.rb` file is usually the first thing people read about your project, so that it should serve as \"general description\" of your project.\r\n\r\nBut it's just a good PRACTICE, you should make your own decisions upon your special situation. \r\n\r\nLastly, when in doubts, read http://guides.rubyonrails.org/routing.html, actually, read it end to end at least twice if you are new to web development. :smiley_cat: \r\n\r\nHope it helps."}}