Class: Alchemy::Ingredients::VideoView
- Inherits:
-
BaseView
- Object
- ViewComponent::Base
- BaseView
- Alchemy::Ingredients::VideoView
show all
- Defined in:
- app/components/alchemy/ingredients/video_view.rb
Instance Attribute Summary
Attributes inherited from BaseView
#ingredient
Instance Method Summary
collapse
Methods inherited from BaseView
#initialize
Instance Method Details
#call ⇒ Object
6
7
8
9
10
|
# File 'app/components/alchemy/ingredients/video_view.rb', line 6
def call
content_tag(:video, html_options) do
tag(:source, src: src, type: attachment.file_mime_type)
end.html_safe
end
|
12
13
14
|
# File 'app/components/alchemy/ingredients/video_view.rb', line 12
def render?
!attachment.nil?
end
|