Skip to content

Instantly share code, notes, and snippets.

@efwe
Last active January 7, 2016 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save efwe/fb0188666fc6228b13e2 to your computer and use it in GitHub Desktop.
Save efwe/fb0188666fc6228b13e2 to your computer and use it in GitHub Desktop.
def coverage
points = TrackPoint.mongo_client[:coverage].find.first
respond_to do |format|
format.json { render :json => points, :content_type => 'application/json' }
format.msgpack { send_data MessagePack.pack(points), :type => 'application/msgpack', :disposition => 'inline' }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment