Two trivial examples on how Sinatra can work with Ruby Object Mapper (version 0.7.0 currently):
- Example for in-memory graph (
in_memory
folder) - Example for SQLite in-memory DB (
sqlite
folder)
First, install needed gems by:
$ bundle install
Then, simply run the Sinatra app:
$ ruby app.rb
Then you can open localhost:4567 and go to "/", "/uber-items" and "/uber-items/1" URLs to see the functionality.