Module: Showtube::ApplicationHelper

Defined in:
app/helpers/showtube/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#showtube_img_tag(vid, imwidth, imheight, html_options = {}) ⇒ Object

imagem de video Youtube



9
10
11
# File 'app/helpers/showtube/application_helper.rb', line 9

def showtube_img_tag(vid, imwidth, imheight, html_options = {})
  image_tag("http://img.youtube.com/vi/#{vid}/0.jpg", :size => "#{imwidth}x#{imheight}")
end

#showtube_tag(vid, shwidth, shheight, html_options = {}) ⇒ Object

youtube videos



4
5
6
# File 'app/helpers/showtube/application_helper.rb', line 4

def showtube_tag(vid, shwidth, shheight, html_options = {})
  %{<iframe width="#{shwidth}" height="#{shheight}" src="http://www.youtube.com/embed/#{vid}" frameborder="0" allowfullscreen></iframe>}.html_safe
end