Class: Spina::UserInterface::TranslationsComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Spina::UserInterface::TranslationsComponent
- Defined in:
- app/components/spina/user_interface/translations_component.rb
Instance Method Summary collapse
-
#initialize(record, label: nil) ⇒ TranslationsComponent
constructor
A new instance of TranslationsComponent.
- #locales ⇒ Object
- #render? ⇒ Boolean
Constructor Details
#initialize(record, label: nil) ⇒ TranslationsComponent
Returns a new instance of TranslationsComponent.
4 5 6 7 |
# File 'app/components/spina/user_interface/translations_component.rb', line 4 def initialize(record, label: nil) @record = record @label = label end |
Instance Method Details
#locales ⇒ Object
13 14 15 |
# File 'app/components/spina/user_interface/translations_component.rb', line 13 def locales spina_locales end |
#render? ⇒ Boolean
9 10 11 |
# File 'app/components/spina/user_interface/translations_component.rb', line 9 def render? spina_locales.many? end |