Of course, add content_type to the before callback:
class MyApp < Sinatra::Base before do content_type 'application/json' end ... end
Sinatra 1.1 introduces pattern matching before filters:
before '/admin/*' do check_logged_in end
Adam Lassek Jan 08 '11 at 3:14 2011-01-08 03:14
source share