lib/traco/class_methods.rb in traco-3.0.0 vs lib/traco/class_methods.rb in traco-3.1.0

- old
+ new

@@ -16,9 +16,13 @@ :"#{attribute}_#{locale}" } } end + def current_locale_column(attribute) + :"#{attribute}_#{I18n.locale}" + end + def human_attribute_name(attribute, options = {}) default = super(attribute, options.merge(default: "")) if default.blank? && attribute.to_s.match(/\A(\w+?)_(#{LOCALE_RE})\z/) column, locale = $1, $2.to_sym