RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

Sinatra using respond_to with url extensions (.json)

I had some issues using respond_to in Sinatra using Sinatra-Contrib. The respond_to method didn't handle url format extensions in the way I expected, instead requiring explicit accepts headers. Sharing my work around for sinatra url format extensions. Is there a better way?

Comments

Post a Comment

Comment abilities for non registered users are currently deactivated, pending time to add a proper CAPTCHA to solve the escalating spam problem. Sorry!