Resurrecting Sinatra-Rom

I am learning Sinatra and Rom. I forked the dusty sinatra-rom project on GitHub.

I run the program with bundle exec rackup.

I am working through the issues. This one has me stumped:

db/commands/products/create.rb throws undefined method relation for CreateProduct:Class (NoMethodError) relation :products

Here is the start of that file:

class CreateProduct < ROM::SQL::Commands::Create[:sql]
  relation :products
  register_as :create
...

Both the relation and the register_as commands are not recognized.

Hey @mslinn,
sinatra-rom is very outdated. Please checkout GitHub - decafsucks/decafsucks: Rebuilding decafsucks.com as an OSS Hanami 2.0 example app. There you see how to use rom-rb properly. If you want to use sinatra, just check the code at decafsucks/persistence.rb at main · decafsucks/decafsucks · GitHub. But I recommend using hanami. You’ll be amazed ;).

best regards

Thanks, I will follow up on your suggestions.

Mike