Is there anyway to respond_to a .yml file extension?
I have tried, but can't get it to work.
respond_to do |format|
format.xml # index.xml.builder
format.yml {render :text => @labels.to_yaml, :content_type => 'text/yaml'}
end
The above code spits out the following error uninitialized constant Mime::YML
no need to add that stuff to environment.rb, just change format.yml to format.yaml and it will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With