Module: Globalize

Defined in:
lib/ab_admin/hooks/globalize_valid_locale.rb

Overview

add `valid_locale?` method to validate locale with globalize

Class Method Summary collapse

Class Method Details

.valid_locale?(loc) ⇒ Boolean


5
6
7
8
# File 'lib/ab_admin/hooks/globalize_valid_locale.rb', line 5

def self.valid_locale?(loc)
  return false unless loc
  available_locales.include?(loc.to_sym)
end