rails 3 embed video
I'm trying to embed youtube video.
in the videos db table, i have field called "link".This contains the link of the video.
In Controller Videos, there is just empty method def vidlist, since i'm just trying to display single video. I have vidlist.html.erb:
<blink>
<h1>Vidlist</h1>
<object width="640" height="385">
<param name="movie" value="<%= Video.first.link %>">
</param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
<embed src="<%= Video.first.link %>"
type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
</blink>
the link contains this string:http://www.youtube.com/v/开发者_如何学CKgmeL_xuB0I?fs=1&hl=en_US&rel=0&autoplay=1 In routes .rb, i have uncommented the default route matching. Then, i started server.Entered localhost:3000/Videos/vidlist
The browser doesn't display anything at all.
and there's nothing in the console too when the server is runningHave you tried using html_safe on the link? This will help ensure that you don't have issues with escape chars etc.
精彩评论