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
226 227 228 229 230 |
# File 'lib/gluttonberg/content/localization.rb', line 226 def self.included(klass) klass.class_eval do belongs_to :locale, :class_name => "Gluttonberg::Locale" end end |
Instance Method Details
#locale_name ⇒ Object
232 233 234 |
# File 'lib/gluttonberg/content/localization.rb', line 232 def locale_name locale.name end |