如何在 Ruby on Rails 中从views/controller_name/page1.html.erb 链接到公共文件夹中的项目?
我需要将 Flash 影片嵌入到 Ruby on Rails 应用程序的一个页面中。我已将 Flash 影片放入公共文件夹中,但我不确定如何从我的页面(位于 views/controller_name/page1.html.erb
)中引用它。我该怎么做?
感谢您的阅读。
I need to embed a flash movie into one of the pages in my Ruby on Rails app. I've put the Flash movie into the public folder, but I'm not sure how to reference it from my page, which is located at views/controller_name/page1.html.erb
. How do I do this?
Thanks for reading.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
link_to,例如(假设它位于公共文件夹中):< /del><%= link_to "My Hot Link Test", "/flashmovie.swf" %>我认为前导“/”并不是绝对必要的。del>抱歉,错过了您想要嵌入它的位置,而不是链接到它的位置。与这个问题的标题相反。 ;-) 这是一种简单的方法:
http://agilewebdevelopment.com/plugins/flashobject
link_to, eg (assuming it's in the public folder):<%= link_to "My Hot Link Test", "/flashmovie.swf" %>The leading "/" isn't strictly necessary, I think.Sorry, missed the bit where you wanted to embed it, not link to it. Contrary to the title of this question. ;-) This is one easy way:
http://agilewebdevelopment.com/plugins/flashobject
我们已经做到了这一点,但我们刚刚使用计划 html
说你的 Flash 横幅位于
/public/flash/ 文件夹,
这只是纯 html
如果有人有更好的选择,请告诉我,
欢呼
萨梅拉
we have done this, But we have just use plan html
say your flash banner is at
/public/flash/ folder
this is nothing but plain html
If someone have a better option please let me know too
cheers
sameera