Registry / web-framework / sinatra-respond-to

sinatra-respond-to

JSON →
library0.9.0rbrubygemsunverified

A respond_to style Rails block for baked-in web service support in Sinatra.

gem install sinatra-respond_to
INSTALL
IMPORT
SIG · SINATRA-RESPOND-TO
S
sinatra-respond-to
web-frameworkrubyv0.9.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Sinatra::RespondTo
require 'sinatra/respond_to'

Define a Sinatra route that responds to different formats using respond_to.

require 'sinatra/respond_to' get '/resource' do respond_to do |format| format.html { erb :resource } format.json { { key: 'value' }.to_json } end end
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.9.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
sinatra-respond-to — gem install sinatra-respond-to · libregistry