{"action":"created","issue":{"url":"https://api.github.com/repos/globalize/globalize/issues/394","labels_url":"https://api.github.com/repos/globalize/globalize/issues/394/labels{/name}","comments_url":"https://api.github.com/repos/globalize/globalize/issues/394/comments","events_url":"https://api.github.com/repos/globalize/globalize/issues/394/events","html_url":"https://github.com/globalize/globalize/issues/394","id":53319467,"number":394,"title":"Can't Order Translated Country Names","user":{"login":"msdundar","id":468744,"avatar_url":"https://avatars.githubusercontent.com/u/468744?v=3","gravatar_id":"","url":"https://api.github.com/users/msdundar","html_url":"https://github.com/msdundar","followers_url":"https://api.github.com/users/msdundar/followers","following_url":"https://api.github.com/users/msdundar/following{/other_user}","gists_url":"https://api.github.com/users/msdundar/gists{/gist_id}","starred_url":"https://api.github.com/users/msdundar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msdundar/subscriptions","organizations_url":"https://api.github.com/users/msdundar/orgs","repos_url":"https://api.github.com/users/msdundar/repos","events_url":"https://api.github.com/users/msdundar/events{/privacy}","received_events_url":"https://api.github.com/users/msdundar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-03T23:59:24Z","updated_at":"2015-01-04T00:13:27Z","closed_at":"2015-01-04T00:07:44Z","body":"I'm using globalize gem to translate country names in my application. I'm trying to order countries by their names but it's not working. Here are model and view.\r\n\r\n**country.rb model =>**\r\n\r\n```ruby\r\nclass Country < ActiveRecord::Base\r\n  translates :name\r\n\r\n  scope :ordered, -> { order(\"country_translations.name ASC\") }\r\n\r\n  def self.translated_country_list\r\n    includes(:translations).with_locales([:en, :tr]).ordered\r\n  end\r\nend\r\n```\r\n\r\n**In view =>**\r\n\r\n```ruby\r\n<%= f.input :country_id, :collection => Country.translated_country_list, :required => true, :autofocus => true, label: false, hint: \"* #{t(\"general.choose_nationality\")}\" %>\r\n```"},"comment":{"url":"https://api.github.com/repos/globalize/globalize/issues/comments/68615107","html_url":"https://github.com/globalize/globalize/issues/394#issuecomment-68615107","issue_url":"https://api.github.com/repos/globalize/globalize/issues/394","id":68615107,"user":{"login":"msdundar","id":468744,"avatar_url":"https://avatars.githubusercontent.com/u/468744?v=3","gravatar_id":"","url":"https://api.github.com/users/msdundar","html_url":"https://github.com/msdundar","followers_url":"https://api.github.com/users/msdundar/followers","following_url":"https://api.github.com/users/msdundar/following{/other_user}","gists_url":"https://api.github.com/users/msdundar/gists{/gist_id}","starred_url":"https://api.github.com/users/msdundar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msdundar/subscriptions","organizations_url":"https://api.github.com/users/msdundar/orgs","repos_url":"https://api.github.com/users/msdundar/repos","events_url":"https://api.github.com/users/msdundar/events{/privacy}","received_events_url":"https://api.github.com/users/msdundar/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T00:13:26Z","updated_at":"2015-01-04T00:13:26Z","body":"Yes, using current locale solved issue for now."}}