Class: Spotlight::Language

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/spotlight/language.rb

Overview

A language for an exhibit

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.default_instanceObject



20
21
22
# File 'app/models/spotlight/language.rb', line 20

def self.default_instance
  new(locale: I18n.default_locale)
end

Instance Method Details

#to_nativeObject



16
17
18
# File 'app/models/spotlight/language.rb', line 16

def to_native
  Spotlight::Engine.config.i18n_locales[locale.to_sym] || ''
end