I'm trying to order a query using a field which is translated with globalize2. The problem is that since stored in database and in an association I'm having lot of problems.
category_translations.name
doesn't work.with_translations
defined in globalize2, however I get an error with this and I couldn't get it to work even without ordering.I've something like that
class Category < ActiveRecord::Base
validates_presence_of :name
validates_uniqueness_of :name
has_many :products, :dependent => :destroy
translates :name
end
The question is, how do I order by the translated name?