Miklos Hollender
2006-Jun-10 11:10 UTC
[Rails] some problems with integrating XUL into Rails
Dear Friends, I started integrating XUL into Rails, however, I have some problems. The first problem is that I can open local XUL files with Firefox, but cannot open them through Rails/Webrick, Firefox says it does not recognize what it is. I''ve read the cookbookxul experiment and I know I have to play around with content-type, but a contoller action like def run_xul response.headers["content-type"]="application/vnd.mozilla.xul+xml" render_text ''<script> window.open ("c:\test.xul","","chrome,resizable");</script>'' end still does not work. I also added the meta-http content-type tag to the xul file, but does not help also. Do yo have any ideas? Also, where should I look around in the complex directory tree of Rails if I want to make .rxul work like .rhtml and .rjs? Thanks, Miklos -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060610/8af7ac05/attachment.html
Francois Beausoleil
2006-Jun-12 02:30 UTC
[Rails] some problems with integrating XUL into Rails
Hi ! 2006/6/10, Miklos Hollender <miklos.hollender@gmail.com>:> def run_xul > > response.headers["content-type"]="application/vnd.mozilla.xul+xml" > render_text ''<script> > window.open("c:\test.xul","","chrome,resizable");</script>'' > endWhat you''re doing here is telling Firefox to open a local file. Instead, use #send_file to send the file with the correct Content-Type to Firefox. That should do it. Bye ! -- Fran?ois Beausoleil http://blog.teksol.info/