{"action":"created","issue":{"url":"https://api.github.com/repos/globalize/globalize/issues/571","repository_url":"https://api.github.com/repos/globalize/globalize","labels_url":"https://api.github.com/repos/globalize/globalize/issues/571/labels{/name}","comments_url":"https://api.github.com/repos/globalize/globalize/issues/571/comments","events_url":"https://api.github.com/repos/globalize/globalize/issues/571/events","html_url":"https://github.com/globalize/globalize/pull/571","id":184620079,"number":571,"title":"Postgres sorting by translates attributes with fallbacks","user":{"login":"dalpo","id":56606,"avatar_url":"https://avatars.githubusercontent.com/u/56606?v=3","gravatar_id":"","url":"https://api.github.com/users/dalpo","html_url":"https://github.com/dalpo","followers_url":"https://api.github.com/users/dalpo/followers","following_url":"https://api.github.com/users/dalpo/following{/other_user}","gists_url":"https://api.github.com/users/dalpo/gists{/gist_id}","starred_url":"https://api.github.com/users/dalpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalpo/subscriptions","organizations_url":"https://api.github.com/users/dalpo/orgs","repos_url":"https://api.github.com/users/dalpo/repos","events_url":"https://api.github.com/users/dalpo/events{/privacy}","received_events_url":"https://api.github.com/users/dalpo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/globalize/globalize/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/globalize/globalize/labels/rails5","name":"rails5","color":"e99695"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-22T09:24:35Z","updated_at":"2016-10-23T14:34:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/globalize/globalize/pulls/571","html_url":"https://github.com/globalize/globalize/pull/571","diff_url":"https://github.com/globalize/globalize/pull/571.diff","patch_url":"https://github.com/globalize/globalize/pull/571.patch"},"body":"Sorting translated attributes with enabled fallbacks is causing an ` ActiveRecord::StatementInvalid: PG::InvalidColumnReference: ERROR` on postgres.\r\n\r\n#### SQL Error:\r\n```\r\nSELECT DISTINCT, ORDER BY expressions must appear in select list\r\n```\r\n\r\n#### Issue history: \r\n- [Added uniq to with_translations to prevent duplicates when fallbacks are defined #489](https://github.com/globalize/globalize/pull/489)\r\n- [Fix: use DISTINCT query only if necessary](https://github.com/globalize/globalize/commit/3610db4cb2447b3ea25d64bf0682dc9704623e47)\r\n- [uniq clause breaks default scope with SQL function](https://github.com/globalize/globalize/issues/519)\r\n"},"comment":{"url":"https://api.github.com/repos/globalize/globalize/issues/comments/255592064","html_url":"https://github.com/globalize/globalize/pull/571#issuecomment-255592064","issue_url":"https://api.github.com/repos/globalize/globalize/issues/571","id":255592064,"user":{"login":"dalpo","id":56606,"avatar_url":"https://avatars.githubusercontent.com/u/56606?v=3","gravatar_id":"","url":"https://api.github.com/users/dalpo","html_url":"https://github.com/dalpo","followers_url":"https://api.github.com/users/dalpo/followers","following_url":"https://api.github.com/users/dalpo/following{/other_user}","gists_url":"https://api.github.com/users/dalpo/gists{/gist_id}","starred_url":"https://api.github.com/users/dalpo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalpo/subscriptions","organizations_url":"https://api.github.com/users/dalpo/orgs","repos_url":"https://api.github.com/users/dalpo/repos","events_url":"https://api.github.com/users/dalpo/events{/privacy}","received_events_url":"https://api.github.com/users/dalpo/received_events","type":"User","site_admin":false},"created_at":"2016-10-23T14:34:58Z","updated_at":"2016-10-23T14:34:58Z","body":"@shioyama Yes, I agree with you. Probably is better that every user manage this use case on its codebase, to avoid monkey patching that could introduce bad side effects... \r\n\r\nAnyway let me know what do you think about this PR :smiley: "}}
{"actor":{"display_login":"dalpo"}}