Module: ActiveElement::Components::Translations
- Included in:
- CollectionTable, Form, Navbar, Util::FieldMapping
- Defined in:
- lib/active_element/components/translations.rb
Overview
Provides ‘#i18n` method as standard entrypoint to translation point, specifies required interface for classes that use this module.
Instance Method Summary collapse
Instance Method Details
#i18n ⇒ Object
8 9 10 |
# File 'lib/active_element/components/translations.rb', line 8 def i18n @i18n ||= Util::I18n.new(self) end |
#model ⇒ Object
12 13 14 15 |
# File 'lib/active_element/components/translations.rb', line 12 def model raise NotImplementedError, 'Component must implement `#model` and return `nil` or an ActiveRecord model class.' end |