Skip to content

Commit e176c6c

Browse files
author
Lukas Hodel
committed
Add auto sort condition also to the form (not just the tab)
1 parent 69885fa commit e176c6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_admin/globalize3/form_builder_extension.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def translated_inputs(name = "Translations", options = {}, &block)
1717
end
1818
end.join.html_safe
1919
end <<
20-
I18n.available_locales.map do |locale|
20+
(auto_sort ? I18n.available_locales.sort : I18n.available_locales).map do |locale|
2121
translation = object.translations.find { |t| t.locale.to_s == locale.to_s }
2222
translation ||= object.translations.build(locale: locale)
2323
fields = proc do |form|

0 commit comments

Comments
 (0)