I got this error;
root cause I think is in
.rvm/gems/ruby-2.1.1/gems/translation_center-1.7.0/app/models/translation_center/translation_key.rb
in method
def create_default_translation
on the line:
translation = self.translations.build(value: self.name.to_s.split('.').last.titleize, lang: :en, status: 'accepted')
the error occurs for me because of the attribute lang: :en
my PG db does not understand the symbol :en
The error is fixed if I change it to a String
translation = self.translations.build(value: self.name.to_s.split('.').last.titleize, lang: 'en', status: 'accepted')
any idea why I need to do this? - couldn't see anyone else having issues with this.
another related issue is that if I call 't' with a symbol I get a similar error , eg ' t(:any_symbol)
This issue is because of the sqeel gem. It does not allow using symbols for values in queries. Therefore, it cannot be used with the translation_center gem.
I got this error; root cause I think is in .rvm/gems/ruby-2.1.1/gems/translation_center-1.7.0/app/models/translation_center/translation_key.rb in method def create_default_translation on the line: translation = self.translations.build(value: self.name.to_s.split('.').last.titleize, lang: :en, status: 'accepted')
the error occurs for me because of the attribute lang: :en my PG db does not understand the symbol :en The error is fixed if I change it to a String translation = self.translations.build(value: self.name.to_s.split('.').last.titleize, lang: 'en', status: 'accepted')
any idea why I need to do this? - couldn't see anyone else having issues with this.
another related issue is that if I call 't' with a symbol I get a similar error , eg ' t(:any_symbol)