{"action":"closed","issue":{"url":"https://api.github.com/repos/amberframework/granite/issues/129","repository_url":"https://api.github.com/repos/amberframework/granite","labels_url":"https://api.github.com/repos/amberframework/granite/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/amberframework/granite/issues/129/comments","events_url":"https://api.github.com/repos/amberframework/granite/issues/129/events","html_url":"https://github.com/amberframework/granite/issues/129","id":292146445,"node_id":"MDU6SXNzdWUyOTIxNDY0NDU=","number":129,"title":"Fix pluralization issues with relationships","user":{"login":"drujensen","id":18718,"node_id":"MDQ6VXNlcjE4NzE4","avatar_url":"https://avatars2.githubusercontent.com/u/18718?v=4","gravatar_id":"","url":"https://api.github.com/users/drujensen","html_url":"https://github.com/drujensen","followers_url":"https://api.github.com/users/drujensen/followers","following_url":"https://api.github.com/users/drujensen/following{/other_user}","gists_url":"https://api.github.com/users/drujensen/gists{/gist_id}","starred_url":"https://api.github.com/users/drujensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drujensen/subscriptions","organizations_url":"https://api.github.com/users/drujensen/orgs","repos_url":"https://api.github.com/users/drujensen/repos","events_url":"https://api.github.com/users/drujensen/events{/privacy}","received_events_url":"https://api.github.com/users/drujensen/received_events","type":"User","site_admin":false},"labels":[{"id":251246819,"node_id":"MDU6TGFiZWwyNTEyNDY4MTk=","url":"https://api.github.com/repos/amberframework/granite/labels/kind:bug","name":"kind:bug","color":"b60205","default":false},{"id":251246822,"node_id":"MDU6TGFiZWwyNTEyNDY4MjI=","url":"https://api.github.com/repos/amberframework/granite/labels/status:help-wanted","name":"status:help-wanted","color":"0e8a16","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-01-27T19:35:57Z","updated_at":"2018-09-09T21:02:44Z","closed_at":"2018-09-09T21:02:44Z","author_association":"MEMBER","body":"Look into integration of an inflector: https://github.com/luckyframework/lucky_inflector\r\n\r\nEDIT:\r\nI think I agree with @shayneoneill that this is one feature in rails that creates a lot of pain.\r\n\r\nI think a better solution is to default to singular but allow for overriding the name so:\r\n```\r\nbelongs_to :user\r\nhas_many :car\r\n```\r\n\r\nThis would use the `Car` class and default to `car_id`.   \r\n\r\nIf someone wanted to use the plural form:\r\n```\r\nbelongs_to :user\r\nhas_many :cars, class_name: Car\r\n```\r\n\r\nYou would be required to specify the class name.  We should also support the `foreign_key` to override the default."}}
{"actor":{"display_login":"drujensen"}}