Reputation: 3990
I want to send a generated view as a kml file, with the necessary headers(content-type and file expires in)... the use of head gives a 500, and using response.headers has no effect...
What should i do?
Upvotes: 3
Views: 6759
Reputation: 8807
You'd need to register the KML mime type. In your config/initializers/mime_types.rb
Mime::Type.register "application/vnd.google-earth.kml", :kml
Then in your action you can do:
format.kml { ... }
KML Tutorial: http://code.google.com/apis/kml/documentation/kml_tut.html#kml_server
Upvotes: 0