Class: Alchemy::Ingredients::AudioView
- Inherits:
-
BaseView
- Object
- ViewComponent::Base
- BaseView
- Alchemy::Ingredients::AudioView
show all
- Defined in:
- app/components/alchemy/ingredients/audio_view.rb
Instance Attribute Summary
Attributes inherited from BaseView
#ingredient
Instance Method Summary
collapse
Methods inherited from BaseView
#initialize
Instance Method Details
#call ⇒ Object
4
5
6
7
8
|
# File 'app/components/alchemy/ingredients/audio_view.rb', line 4
def call
content_tag(:audio, **html_options) do
tag(:source, src: src, type: type)
end
end
|
10
11
12
|
# File 'app/components/alchemy/ingredients/audio_view.rb', line 10
def render?
!!ingredient.attachment
end
|