{"action":"created","issue":{"url":"https://api.github.com/repos/AgileVentures/LocalSupport/issues/292","repository_url":"https://api.github.com/repos/AgileVentures/LocalSupport","labels_url":"https://api.github.com/repos/AgileVentures/LocalSupport/issues/292/labels{/name}","comments_url":"https://api.github.com/repos/AgileVentures/LocalSupport/issues/292/comments","events_url":"https://api.github.com/repos/AgileVentures/LocalSupport/issues/292/events","html_url":"https://github.com/AgileVentures/LocalSupport/pull/292","id":150949720,"number":292,"title":"118172295 friendly id should have custom parser","user":{"login":"bryszard","id":12682792,"avatar_url":"https://avatars.githubusercontent.com/u/12682792?v=3","gravatar_id":"","url":"https://api.github.com/users/bryszard","html_url":"https://github.com/bryszard","followers_url":"https://api.github.com/users/bryszard/followers","following_url":"https://api.github.com/users/bryszard/following{/other_user}","gists_url":"https://api.github.com/users/bryszard/gists{/gist_id}","starred_url":"https://api.github.com/users/bryszard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryszard/subscriptions","organizations_url":"https://api.github.com/users/bryszard/orgs","repos_url":"https://api.github.com/users/bryszard/repos","events_url":"https://api.github.com/users/bryszard/events{/privacy}","received_events_url":"https://api.github.com/users/bryszard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2016-04-25T18:50:51Z","updated_at":"2016-05-06T10:39:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/AgileVentures/LocalSupport/pulls/292","html_url":"https://github.com/AgileVentures/LocalSupport/pull/292","diff_url":"https://github.com/AgileVentures/LocalSupport/pull/292.diff","patch_url":"https://github.com/AgileVentures/LocalSupport/pull/292.patch"},"body":"Adds feature - https://www.pivotaltracker.com/story/show/118172295.\r\n\r\nOK, now friendly_id has a custom parser. It makes slugs in a following order (gets to next if it's not unique):\r\n1. short_name - 3 first words of the name (separated by \"-\"); it deletes apostrophies from words\r\n2. prolonged_name - short_name with two last words of the name (separated by \"-\"); it deletes apostrophies from words\r\n3. name - every word of the name, separated by \"-\" (friendly_id default); it doesn't delete apostrophies from words\r\n\r\nNevertheless, the problem are now names like \"The Stanmore And Canons Park Synagogue Eruv Committee\" - slug here would be \"the-stanmore-and\". \r\n\r\nSolution to that would be more complicated custom parser (e.g. throwing out \"the\", \"and\" or other similar words) or totally custom slugs - setup by users through a form.\r\n\r\nI found explanation to add the \"slug_candidates\" method here: http://norman.github.io/friendly_id/file.Guide.html"},"comment":{"url":"https://api.github.com/repos/AgileVentures/LocalSupport/issues/comments/217408430","html_url":"https://github.com/AgileVentures/LocalSupport/pull/292#issuecomment-217408430","issue_url":"https://api.github.com/repos/AgileVentures/LocalSupport/issues/292","id":217408430,"user":{"login":"bryszard","id":12682792,"avatar_url":"https://avatars.githubusercontent.com/u/12682792?v=3","gravatar_id":"","url":"https://api.github.com/users/bryszard","html_url":"https://github.com/bryszard","followers_url":"https://api.github.com/users/bryszard/followers","following_url":"https://api.github.com/users/bryszard/following{/other_user}","gists_url":"https://api.github.com/users/bryszard/gists{/gist_id}","starred_url":"https://api.github.com/users/bryszard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryszard/subscriptions","organizations_url":"https://api.github.com/users/bryszard/orgs","repos_url":"https://api.github.com/users/bryszard/repos","events_url":"https://api.github.com/users/bryszard/events{/privacy}","received_events_url":"https://api.github.com/users/bryszard/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T10:39:45Z","updated_at":"2016-05-06T10:39:45Z","body":"Thanks, it worked!"}}