Class: Atreides::Site
- Includes:
- Extendable
- Defined in:
- app/models/atreides/site.rb
Class Method Summary collapse
-
.default ⇒ Object
Use www or go for the first one.
Instance Method Summary collapse
-
#lang ⇒ Object
Instance methods.
Methods inherited from Base
Class Method Details
.default ⇒ Object
Use www or go for the first one
37 38 39 |
# File 'app/models/atreides/site.rb', line 37 def default find_by_name('www') || first || create(:name => 'www', :lang => I18n.locale) end |
Instance Method Details
#lang ⇒ Object
Instance methods
46 47 48 49 |
# File 'app/models/atreides/site.rb', line 46 def lang # Symbolize to make easier to integrate w I18n read_attribute(:lang) ? read_attribute(:lang).to_sym : nil end |