Hi,
I am generating some SVG content from my app. To get that working I’ve
done the next:
Add line in /config/initializers/mime_types.rb$:
Mime::Type.register “application/xhtml+xml”, :svg
In my controller I have now added to the respond_to:
format.svg { render :action => “svg.rhtml”, :layout => false }
svg.rhtml is something like:
<% for session in @online_sessions %>
<text id=“user” x=“325” y=“80” width=“200” height=“20” … >
<%= getUsernameFromID(session.user_id) %>
<% end %>
Now. When I have the new line in the mime_types.rb and try to access the
app I get:
“This XML file does not appear to have any style information associated
with it. The document tree is shown below.”
The only thing I see is the XML model. No layout.
If I remove the new line then everything works 8-P
The funny thing is that all works fine in the environment I use in
Windows with InstantRails. And the same thing causes this effect when I
run it in Ubuntu. Same versions for everything and using webrick as
server in both.
Any good ideas?
Thanks!