views:

47

answers:

2

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.

+1  A: 

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

ghoppe
Sorry i mistaked the vote I'll correct this if you just edit the question
tommasop
Sorry about the misleading title! The link looks great, thanks for your help.
ben
+1  A: 

Hi

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

sameera207