Erwin
2010-Mar-18 18:18 UTC
differences between relative_url using Rails with Prototype or JQuery
My web app is deployed with Passenger in a sub-uri, http://www.mydomain.com/vacademy/ and I am displaying a player in a page the swf is located in ../public/dist/flowplayer-3.1.5.swf Using Prototype library I wrote a script : <script> $f("player", "./dist/flowplayer-3.1.5.swf", { .... and I don''t have any problem to get the player installed from http://www.mydomain.com/vacademy/dist/flowplayer-3.1.5.swf but when using jQuery <script> $(function() { ...... $f("player2", "./dist/flowplayer-3.1.5.swf", { ... the .swf is not found as the relative url is based on the controller ... http://www.mydomain.com/vacademy/mycontroller/dist/flowplayer-3.1.5.swf is there anyway to bypass this behavior, not using a relative path or getting the rails public path in js ? thanks for your help erwin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.