globalize/globalize

Does issue of duplicated translations fixed in version 5.3.0?

estafaa opened this issue · 1 comments

Hi,

I have

ruby '2.3.4'
rails '~> 4.2.7.1'
globalize  '~> 5.1.0'
class Posts < ActiveRecord::Base
translates :title
...

2 locales, :en and :de.

Fallbacks to :en works fine, if I don't have a translation for the :de, it shows in :en.

The problem is (and there are already posted issues about it)

if
I18n.locale = :de
then
@posts = Post.all.order(:title)
will return duplicated records for those elements that have translations.

It works okay if I don't user 'order'. If I user with_translations(I18n.locale), then fallback will not work.

Question:
Is this problem fixed in the last version of Globalize gem (5.3.0)?
(I can not try it, because I will need to update rails for that).

Thank you very much!

Seems I found a solution to that issues with .order method

instead of using order(:title), I used reorder(:title)

.order joins tables, but .reorder does not do it.
fallbacks and everything else works fine. for now... :)