lib/traco/class_methods.rb in traco-3.1.3 vs lib/traco/class_methods.rb in traco-3.1.4
- old
+ new
@@ -1,19 +1,19 @@
module Traco
module ClassMethods
def locales_for_attribute(attribute)
- traco_cache(attribute, LocaleFallbacks::ANY_FALLBACK).keys
+ traco_cache(attribute, LocaleFallbacks::DEFAULT_FIRST_FALLBACK).keys
end
- # Consider this method internal.
- def _locale_columns_for_attribute(attribute, fallback)
- traco_cache(attribute, fallback).values
- end
-
def locale_columns(*attributes)
attributes.each_with_object([]) do |attribute, columns|
- columns.concat(_locale_columns_for_attribute(attribute, LocaleFallbacks::ANY_FALLBACK))
+ columns.concat(_locale_columns_for_attribute(attribute, LocaleFallbacks::DEFAULT_FIRST_FALLBACK))
end
+ end
+
+ # Consider this method internal.
+ def _locale_columns_for_attribute(attribute, fallback)
+ traco_cache(attribute, fallback).values
end
def current_locale_column(attribute)
Traco.column(attribute, I18n.locale)
end