Module: Voluntary::LanguageHelper

Defined in:
app/helpers/voluntary/language_helper.rb

Instance Method Summary collapse

Instance Method Details

#all_language_optionsObject



13
14
15
# File 'app/helpers/voluntary/language_helper.rb', line 13

def all_language_options
  User.languages.sort_by { |o| o[0] }
end

#available_language_optionsObject



3
4
5
6
7
8
9
10
11
# File 'app/helpers/voluntary/language_helper.rb', line 3

def available_language_options
  options = []
  
  AVAILABLE_LANGUAGES.each do |locale, language|
    options << [language, locale]
  end
  
  options.sort_by { |o| o[0] }
end