0

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.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
ben
  • 29,229
  • 42
  • 124
  • 179
  • You can check here for some options http://stackoverflow.com/questions/1146624/how-to-do-static-content-in-rails – tommasop May 17 '10 at 06:59
  • ben, you should add a little more description here. Is it just one flash file? or is the file associated with a model? If its just one flash file that is in /controller_name/page1 (where page1 one is a static page using a controller) then it shouldn't be any different then embedding the file in a static html file. Also which is it!? linking or embedding? You need to change the title or the description of this question so they are not contradicting each other. – aarona May 17 '10 at 08:10

2 Answers2

1

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
  • 21,452
  • 3
  • 30
  • 21
1

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
  • 16,547
  • 19
  • 87
  • 152