String.translation_for() will return incorrectly, if there are unsaved translations #88

Closed
jhilden opened this Issue Jun 7, 2012 · 1 comment

Projects

None yet

2 participants

@jhilden

If I have a String object and I add new translations to it in such a way:
string.translations << WebTranslateIt::Translation.new({ :locale => "es", :text => "text", :string_id => string.id })
In order to save it later with string.save

Then string.translation_for('any') will always return the created translation object from above instead the expected value (in this case nil), until the string+translations has been saved.

Gem version is 2.0.2

Let me know if you need more information.

@edouard
Atelier Convivialité member

Hey Jakob,

Thank you for reporting this bug. I just fixed it on master and I will release a new version of the gem shortly.

Best,
Édouard

@edouard edouard closed this Jun 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment