Extract available languages

#640
This commit is contained in:
Artur Beljajev 2017-11-23 10:17:59 +02:00
parent 77b24fdbd1
commit 5f69067d35
3 changed files with 10 additions and 2 deletions

View file

@ -14,7 +14,7 @@ module FormHelper
end
def language_select(object, method, choices = nil, options = {}, html_options = {}, &block)
choices = options_for_select({ en: 'English', et: 'Estonian' }.invert, options[:selected])
choices = options_for_select(available_languages, options[:selected])
select(object, method, choices, options, html_options, &block)
end
end