Class: Alchemy::Ingredients::BooleanView
- Inherits:
-
BaseView
- Object
- ViewComponent::Base
- BaseView
- Alchemy::Ingredients::BooleanView
show all
- Defined in:
- app/components/alchemy/ingredients/boolean_view.rb
Instance Attribute Summary
Attributes inherited from BaseView
#html_options, #ingredient
Instance Method Summary
collapse
Methods inherited from BaseView
#initialize
Instance Method Details
#call ⇒ Object
4
5
6
|
# File 'app/components/alchemy/ingredients/boolean_view.rb', line 4
def call
Alchemy.t(value.to_s, scope: "ingredient_values.boolean").html_safe
end
|
8
9
10
|
# File 'app/components/alchemy/ingredients/boolean_view.rb', line 8
def render?
!value.nil?
end
|