Sha256: c95307fd5e0d4b55cfa7b1981a3ad8481fa756dabf1e2d0a72dce373724dfa98
Contents?: true
Size: 462 Bytes
Versions: 14
Compression:
Stored size: 462 Bytes
Contents
require 'rack/conneg' module <%= @gen.camelname %> class App < Sinatra::Base set :public_folder, 'public' set :views, 'views' use Rack::Conneg do |conneg| conneg.set :accept_all_extensions, false conneg.set :fallback, :html conneg.ignore_contents_of 'public' conneg.provide [ :html, :json ] end before do if negotiated? content_type negotiated_type end end end end
Version data entries
14 entries across 14 versions & 1 rubygems