Module: PxvideoRails::ViewHelpers

Defined in:
lib/pxvideo_rails/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#pxvideo_rails(*options, &blk) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/pxvideo_rails/view_helpers.rb', line 3

def pxvideo_rails(*options, &blk)
  default_options = {
    controls: true,
    setup: "{}",
    preload: "auto",
    width: 640,
    height: 480
  }
  options = default_options.merge(options.extract_options!)
  render partial: 'pxvideo_rails/pxvideo_rails', locals: { options: options }, &blk
end