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



22
23
24
# File 'app/models/spotlight/language.rb', line 22

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

Instance Method Details

#to_nativeObject



18
19
20
# File 'app/models/spotlight/language.rb', line 18

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