Module: Gluttonberg::Content::Localization::ModelLocalization
- Defined in:
- lib/gluttonberg/content/localization.rb
Overview
This module is used when dynamically creating the localization class.
Class Method Summary collapse
-
.included(klass) ⇒ Object
This included hook is used to declare base properties like the id and to set up associations to the dialect and locale.
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
This included hook is used to declare base properties like the id and to set up associations to the dialect and locale
223 224 225 226 227 |
# File 'lib/gluttonberg/content/localization.rb', line 223 def self.included(klass) klass.class_eval do belongs_to :locale, :class_name => "Gluttonberg::Locale" end end |
Instance Method Details
#locale_name ⇒ Object
229 230 231 |
# File 'lib/gluttonberg/content/localization.rb', line 229 def locale_name locale.name end |