Module: Resizing::Rails::VideosHelper
- Defined in:
- app/helpers/resizing/rails/videos_helper.rb
Instance Method Summary collapse
- #resizing_prepare_video_url(*args) ⇒ Object
- #resizing_video_tag(resizing_rails_video) ⇒ Object
- #video_file_field_tag(name, options = {}) ⇒ Object
Instance Method Details
#resizing_prepare_video_url(*args) ⇒ Object
11 12 13 |
# File 'app/helpers/resizing/rails/videos_helper.rb', line 11 def resizing_prepare_video_url(*args) Resizing::Rails::Engine.routes.url_helpers.prepare_videos_url(*args) end |
#resizing_video_tag(resizing_rails_video) ⇒ Object
15 16 17 |
# File 'app/helpers/resizing/rails/videos_helper.rb', line 15 def resizing_video_tag resizing_rails_video raw "<div class='video' data-video-url=#{resizing_rails_video.data_self_url}></div>" end |
#video_file_field_tag(name, options = {}) ⇒ Object
3 4 5 6 7 8 9 |
# File 'app/helpers/resizing/rails/videos_helper.rb', line 3 def video_file_field_tag name, = {} raise ArgumentError, "video_file_field_tag requires Hash as option arguments" unless .is_a? Hash = .merge(only_path: true) args['data-video-prepare-url'] = prepare_video_url() file_field_tag name end |