Without seeing the embed code I'll just guess you can use some inline erb to insert a variable or database field value into the embed.
I hope that helps somehow.
hi thanks for the comment i want to pass the xml file to show the realted video at the bottem of the page the problem is that i have to write that xml file in the public folder when i give the path of the view it gives me errors in public directory i have to made deffrent --2 file at each time so each there is any solutions for that Thanks
Hi Amit, I just dealt with an issue like this recently and noted it in "this post":http://www.workingwithrails.com/forums/4/topics/83-create-an-xml-file-in-memory.
I'll recap here quickly though. I was able to send the xml data directly to the flash player without creating a file at all by creating a controller that calls send_data to send the generated xml. I then inserted inline ruby calling "url_for" to supply a "file path" to flash object like so using your example embed code:
So no files to clean up, no time wasted writing/reading from the file system. Works really well for me.
I wish I could make things clearer but I hope this helps anyway.
Hi Thanks for comment but still i have problem my conroller code is
def test12 @sampledata=[@amit,@amit] @sampledata1=[@test2,@test2] send_data stream, :filename => 'videos/test12.rxml', :type => 'text/xml', :disposition => 'inline' end
and the rxml code is here
xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8" xml.recommendations do xml.recommendation do xml.title('Reporting sdssfrom Mint') xml.image('http://www.test.com/test/thumb1.jpg') xml.link('http://www.sdsdss.com') end end
But recomnadation is still not working can u figure out this Thanks