Module: Alchemy::Language::Code

Extended by:
ActiveSupport::Concern
Included in:
Alchemy::Language
Defined in:
app/models/alchemy/language/code.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#codeObject



6
7
8
# File 'app/models/alchemy/language/code.rb', line 6

def code
  [language_code, country_code].select(&:present?).join("-")
end

#code=(code) ⇒ Object



10
11
12
# File 'app/models/alchemy/language/code.rb', line 10

def code=(code)
  self.language_code = code
end