restful api using sinatra and active record