As I understand it, the Sinatra framework, unlike Rails, does not provide an ORM. In that case, how do you talk to a DB in a Sinatra app? Or is Sinatra only for apps that don’t use a DB?
As I understand it, the Sinatra framework, unlike Rails, does not provide an ORM.
Share
If you like ActiveRecord, use that. Or something else. Datamapper, for instance. For AR with SQLite, this works: