If you’re using Sequel models, just throw in the quick line of plugin :json_serializer.
12345678
# Get our database connectionrequire_relative"./db"moduleScoreboardApiclassTeam<Sequel::Model(:team)plugin:json_serializerserialize_attributes:json,:nameendend
Then, you just use the Sinatra contrib gem to have it json serializer attach:
1234
# Web frameworkgem"sinatra","1.4.6",require:"sinatra/base"# Sinatra addons - JSON, Namespacegem"sinatra-contrib","1.4.6"