Sinatra app replicating Rails ActiveRecord