{"action":"created","issue":{"url":"https://api.github.com/repos/theodorton/yard-activerecord/issues/23","labels_url":"https://api.github.com/repos/theodorton/yard-activerecord/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/theodorton/yard-activerecord/issues/23/comments","events_url":"https://api.github.com/repos/theodorton/yard-activerecord/issues/23/events","html_url":"https://github.com/theodorton/yard-activerecord/issues/23","id":60583327,"number":23,"title":"Resolution of namespaced models is unreliable","user":{"login":"deuberger","id":5875881,"avatar_url":"https://avatars.githubusercontent.com/u/5875881?v=3","gravatar_id":"","url":"https://api.github.com/users/deuberger","html_url":"https://github.com/deuberger","followers_url":"https://api.github.com/users/deuberger/followers","following_url":"https://api.github.com/users/deuberger/following{/other_user}","gists_url":"https://api.github.com/users/deuberger/gists{/gist_id}","starred_url":"https://api.github.com/users/deuberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deuberger/subscriptions","organizations_url":"https://api.github.com/users/deuberger/orgs","repos_url":"https://api.github.com/users/deuberger/repos","events_url":"https://api.github.com/users/deuberger/events{/privacy}","received_events_url":"https://api.github.com/users/deuberger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/theodorton/yard-activerecord/milestones/2","html_url":"https://github.com/theodorton/yard-activerecord/milestones/1.0.0","labels_url":"https://api.github.com/repos/theodorton/yard-activerecord/milestones/2/labels","id":1016318,"number":2,"title":"1.0.0","description":"# Use reflection APIs instead of parsing code\r\n\r\n## Attributes\r\nUse `ActiveRecord::Base.columns`\r\n\r\n## Associations\r\nUse `ActiveRecord::Base.reflect_on_all_associations `\r\n\r\n## Validations\r\nUse something like https://github.com/redinger/validation_reflection\r\n\r\n## Scopes\r\nTBA\r\n\r\n## Delegations\r\nTBA\r\n","creator":{"login":"theodorton","id":874365,"avatar_url":"https://avatars.githubusercontent.com/u/874365?v=3","gravatar_id":"","url":"https://api.github.com/users/theodorton","html_url":"https://github.com/theodorton","followers_url":"https://api.github.com/users/theodorton/followers","following_url":"https://api.github.com/users/theodorton/following{/other_user}","gists_url":"https://api.github.com/users/theodorton/gists{/gist_id}","starred_url":"https://api.github.com/users/theodorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theodorton/subscriptions","organizations_url":"https://api.github.com/users/theodorton/orgs","repos_url":"https://api.github.com/users/theodorton/repos","events_url":"https://api.github.com/users/theodorton/events{/privacy}","received_events_url":"https://api.github.com/users/theodorton/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2015-03-11T12:33:51Z","updated_at":"2015-03-11T12:38:17Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-03-10T22:56:12Z","updated_at":"2015-03-11T12:44:36Z","closed_at":null,"body":"The current README says:\r\n\r\n```\r\nThere is an issue with namespaced classes. Currently this plugin will try and\r\nfetch a class with a namespace if it does not find one at the first try.\r\n\r\nExample:\r\n\r\n    Table name        Class name\r\n    sales_people      SalesPeople # does not exist\r\n    sales_people      Sales::People # does exist\r\n\r\nA problem then emerges if you have namespaces with two names.\r\n\r\nExample:\r\n\r\n    Table name          Class name\r\n    sales_force_people  SalesForcePeople # does not exist\r\n    sales_force_people  Sales::ForcePeople # does not exist\r\n\r\nThe documentation will then be skipped for this table/class.\r\n```\r\n\r\nThis is just to document the issue as an issue with hopes of somehow resolving it."},"comment":{"url":"https://api.github.com/repos/theodorton/yard-activerecord/issues/comments/78255665","html_url":"https://github.com/theodorton/yard-activerecord/issues/23#issuecomment-78255665","issue_url":"https://api.github.com/repos/theodorton/yard-activerecord/issues/23","id":78255665,"user":{"login":"deuberger","id":5875881,"avatar_url":"https://avatars.githubusercontent.com/u/5875881?v=3","gravatar_id":"","url":"https://api.github.com/users/deuberger","html_url":"https://github.com/deuberger","followers_url":"https://api.github.com/users/deuberger/followers","following_url":"https://api.github.com/users/deuberger/following{/other_user}","gists_url":"https://api.github.com/users/deuberger/gists{/gist_id}","starred_url":"https://api.github.com/users/deuberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deuberger/subscriptions","organizations_url":"https://api.github.com/users/deuberger/orgs","repos_url":"https://api.github.com/users/deuberger/repos","events_url":"https://api.github.com/users/deuberger/events{/privacy}","received_events_url":"https://api.github.com/users/deuberger/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T12:44:36Z","updated_at":"2015-03-11T12:44:36Z","body":"Hmm, I've had mixed feelings as to where it's best to document model attributes/columns. To me it would be ideal for the documentation to live with the code that creates the columns which would be in the migrations. Unfortunately, you shouldn't edit old migrations anyway, so in many cases the comments would end up in a separate migration. The schema would be a nice place to put them too except that it's generated automatically and some people may not use ruby version. So maybe putting all comments in the class definition is best we can do. My only problem with that is that it separates the definition (of the columns/attributes) and the documentation of those attributes.\r\n\r\nIn our case, we're missing the documentation of the instance attributes that allow read/write access to each column. I think that's the only thing the schema is used for, right? It may be simplest for us to just document them using the attribute directive in the class/model definition if that's the direction you're going long term anyway."}}