{"action":"created","issue":{"url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/793","repository_url":"https://api.github.com/repos/activerecord-hackery/ransack","labels_url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/793/labels{/name}","comments_url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/793/comments","events_url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/793/events","html_url":"https://github.com/activerecord-hackery/ransack/issues/793","id":230013900,"number":793,"title":"Impossible to order by hstore column","user":{"login":"bolshakov","id":991265,"avatar_url":"https://avatars0.githubusercontent.com/u/991265?v=4","gravatar_id":"","url":"https://api.github.com/users/bolshakov","html_url":"https://github.com/bolshakov","followers_url":"https://api.github.com/users/bolshakov/followers","following_url":"https://api.github.com/users/bolshakov/following{/other_user}","gists_url":"https://api.github.com/users/bolshakov/gists{/gist_id}","starred_url":"https://api.github.com/users/bolshakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bolshakov/subscriptions","organizations_url":"https://api.github.com/users/bolshakov/orgs","repos_url":"https://api.github.com/users/bolshakov/repos","events_url":"https://api.github.com/users/bolshakov/events{/privacy}","received_events_url":"https://api.github.com/users/bolshakov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-19T15:43:48Z","updated_at":"2017-09-16T11:44:22Z","closed_at":null,"author_association":"NONE","body":"I'm trying to order by hstore value, and it builds wrong SQL query:\r\n\r\n```ruby\r\nransack = Country.ransack\r\nransack.sorts =  \"name_translations -> 'ru'\"\r\nransack.result.to_sql\r\n#=> \"SELECT \\\"countries\\\".* FROM \\\"countries\\\"  ORDER BY \\\"countries\\\".\\\"name_translations\\\" ASC\"\r\n```\r\n\r\nExpected query is:\r\n\r\n```ruby\r\nCountry.order(\"name_translations -> 'ru'\").to_sql \r\n#=>  \"SELECT \\\"countries\\\".* FROM \\\"countries\\\"  ORDER BY name_translations -> 'ru'\"\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/comments/329963613","html_url":"https://github.com/activerecord-hackery/ransack/issues/793#issuecomment-329963613","issue_url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/793","id":329963613,"user":{"login":"mensfeld","id":392754,"avatar_url":"https://avatars3.githubusercontent.com/u/392754?v=4","gravatar_id":"","url":"https://api.github.com/users/mensfeld","html_url":"https://github.com/mensfeld","followers_url":"https://api.github.com/users/mensfeld/followers","following_url":"https://api.github.com/users/mensfeld/following{/other_user}","gists_url":"https://api.github.com/users/mensfeld/gists{/gist_id}","starred_url":"https://api.github.com/users/mensfeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mensfeld/subscriptions","organizations_url":"https://api.github.com/users/mensfeld/orgs","repos_url":"https://api.github.com/users/mensfeld/repos","events_url":"https://api.github.com/users/mensfeld/events{/privacy}","received_events_url":"https://api.github.com/users/mensfeld/received_events","type":"User","site_admin":false},"created_at":"2017-09-16T11:44:21Z","updated_at":"2017-09-16T11:44:21Z","author_association":"NONE","body":"@bolshakov you need to use @laserlemon hack from this thread to make it work as defined via custom scopes: https://github.com/activerecord-hackery/ransack/issues/100"}}
{"actor":{"display_login":"mensfeld"}}