lib/traco/class_methods.rb in traco-5.1.0 vs lib/traco/class_methods.rb in traco-5.2.0
- old
+ new
@@ -3,9 +3,11 @@
def locales_for_attribute(attribute)
traco_cache(attribute, fallback: LocaleFallbacks::ANY_FALLBACK).keys
end
def locale_columns(*attributes)
+ attributes = attributes.presence || translatable_attributes
+
attributes.flat_map { |attribute|
_locale_columns_for_attribute(attribute, fallback: LocaleFallbacks::ANY_FALLBACK)
}
end