There is an issue that randomly happens in the method
def store_translated_attributes
return true unless @translated_attributes_changed
translations.delete_all
@translated_attributes.each do |locale, attributes|
attributes.each do |attribute, value|
next if value.blank?
next unless self.class.translated_attributes_options[:fields].include? attribute.to_sym
translations.create!(translated_attributes_options[:attribute_column] => attribute, :text=>value, :language=>locale)
end
end
@translated_attributes_changed = false
true
end
Hi,
There is an issue that randomly happens in the method
the line
throws the error
unknown attribute: attribute
This seems to be because the translation model through the association is not loaded yet. Doing a
fixes the problem.
So could I suggest a fix like this
This solves the problem by doing the load of the model through the association and stops the error from happening.
If you have a better idea of how to fix this could you let me know, or even better implement it so I could do a pull of the new code?
Thanks