payload: {"action":"created","issue":{"url":"https://api.github.com/repos/datarockets/datarockets-style/issues/19","repository_url":"https://api.github.com/repos/datarockets/datarockets-style","labels_url":"https://api.github.com/repos/datarockets/datarockets-style/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/datarockets/datarockets-style/issues/19/comments","events_url":"https://api.github.com/repos/datarockets/datarockets-style/issues/19/events","html_url":"https://github.com/datarockets/datarockets-style/issues/19","id":449253297,"node_id":"MDU6SXNzdWU0NDkyNTMyOTc=","number":19,"title":"Style/ClassAndModuleChildren","user":{"login":"roman-dubrovsky","id":7738063,"node_id":"MDQ6VXNlcjc3MzgwNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/7738063?v=4","gravatar_id":"","url":"https://api.github.com/users/roman-dubrovsky","html_url":"https://github.com/roman-dubrovsky","followers_url":"https://api.github.com/users/roman-dubrovsky/followers","following_url":"https://api.github.com/users/roman-dubrovsky/following{/other_user}","gists_url":"https://api.github.com/users/roman-dubrovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/roman-dubrovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roman-dubrovsky/subscriptions","organizations_url":"https://api.github.com/users/roman-dubrovsky/orgs","repos_url":"https://api.github.com/users/roman-dubrovsky/repos","events_url":"https://api.github.com/users/roman-dubrovsky/events{/privacy}","received_events_url":"https://api.github.com/users/roman-dubrovsky/received_events","type":"User","site_admin":false},"labels":[{"id":1287584624,"node_id":"MDU6TGFiZWwxMjg3NTg0NjI0","url":"https://api.github.com/repos/datarockets/datarockets-style/labels/feature%20request","name":"feature request","color":"00dd00","default":false},{"id":1287584625,"node_id":"MDU6TGFiZWwxMjg3NTg0NjI1","url":"https://api.github.com/repos/datarockets/datarockets-style/labels/help%20wanted","name":"help wanted","color":"ff6600","default":true},{"id":1287584623,"node_id":"MDU6TGFiZWwxMjg3NTg0NjIz","url":"https://api.github.com/repos/datarockets/datarockets-style/labels/postponed","name":"postponed","color":"d9d9d9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2019-05-28T12:55:14Z","updated_at":"2019-09-11T09:39:55Z","closed_at":null,"author_association":"MEMBER","body":"I prefer to use the Rails compact style but looks like there are some issues with it.\r\n\r\n```\r\nStyle/ClassAndModuleChildren:\r\n  EnforcedStyle: compact\r\n```\r\n\r\nhttps://rubocop.readthedocs.io/en/latest/cops_style/#styleclassandmodulechildren\r\nhttps://github.com/rubocop-hq/ruby-style-guide#namespace-definition"},"comment":{"url":"https://api.github.com/repos/datarockets/datarockets-style/issues/comments/530304646","html_url":"https://github.com/datarockets/datarockets-style/issues/19#issuecomment-530304646","issue_url":"https://api.github.com/repos/datarockets/datarockets-style/issues/19","id":530304646,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMDMwNDY0Ng==","user":{"login":"roman-dubrovsky","id":7738063,"node_id":"MDQ6VXNlcjc3MzgwNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/7738063?v=4","gravatar_id":"","url":"https://api.github.com/users/roman-dubrovsky","html_url":"https://github.com/roman-dubrovsky","followers_url":"https://api.github.com/users/roman-dubrovsky/followers","following_url":"https://api.github.com/users/roman-dubrovsky/following{/other_user}","gists_url":"https://api.github.com/users/roman-dubrovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/roman-dubrovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roman-dubrovsky/subscriptions","organizations_url":"https://api.github.com/users/roman-dubrovsky/orgs","repos_url":"https://api.github.com/users/roman-dubrovsky/repos","events_url":"https://api.github.com/users/roman-dubrovsky/events{/privacy}","received_events_url":"https://api.github.com/users/roman-dubrovsky/received_events","type":"User","site_admin":false},"created_at":"2019-09-11T09:39:55Z","updated_at":"2019-09-11T09:39:55Z","author_association":"MEMBER","body":"@AleksSenkou \r\n\r\n1) yeap, but usually we should not have the next controllers schema\r\n\r\n```ruby\r\nclass V1::Users::PostsController < ApplicationController\r\n```\r\n\r\n- when we implement an additional base controller for each version which should implement some specific versions things for the current version (method of authorization, some exception handlers and e.g.) \r\n\r\n```ruby\r\nclass V1::BaseController < ApplicationController\r\nend\r\n\r\nclass  V1::Users::PostsController  < V1::BaseController\r\n```\r\n\r\n- when we wrap some controller into `Users` module it usually means that we have a route like `users/:user_id/posts` and e.g.\r\n\r\nso for me, making a base controller for Users module is a good idea so that we can isolate uniq logic for finding and authorizing users. \r\n\r\n```ruby\r\nclass V1::Users::BaseController < V1::BaseController\r\nend\r\n\r\nclass  V1::Users::PostsController  < V1::Users::BaseController\r\n```\r\n\r\n- in the example above, we can have a lot of versions and a lot of Users modules and we don't want to duplicate `Users::BaseController` logic each time. So here, I prefer to move shared `Users::BaseController` logic into module and make multi-inheritance for `Users::BaseController`  controllers but I prefer to still use base controllers for each versions so that we can override some logic for some specific version\r\n \r\n```ruby\r\nclass V1::BaseController < ApplicationController\r\nend\r\n\r\nclass V1::Users::BaseController < V1::BaseController\r\n  include UsersFindable\r\nend\r\n\r\nclass  V1::Users::PostsController  < V1::Users::BaseController\r\nend\r\n\r\nclass V2::BaseController < ApplicationController\r\nend\r\n\r\nclass V2::Users::BaseController < V2::BaseController\r\n  include UsersFindable\r\nend\r\n\r\nclass  V2::Users::PostsController  < V2::Users::BaseController\r\nend\r\n```\r\n\r\nAnd here looks like `nested` style makes sense.  Thoughts? \r\n"}}
other: {"actor":{"display_login":"roman-dubrovsky"}}