Show Menu
Cheatography

ROM - Ruby object mapper Cheat Sheet (DRAFT) by

Ruby Object Mapper (rom-rb) is a fast ruby persistence library with the goal of providing powerful object mapping capabilities without limiting the full power of the underlying datastore.

This is a draft cheat sheet. It is a work in progress and is not finished yet.

first

users = rom.relation(:users)
changeset = users
  .changeset(:update, id: 1)
  .set(name: 'Bob')
  .commit
 

a

aaa

titleab

a
b
note

code

require 'rom-repository'

class UserRepo < ROM::Repository[:users]
  commands :create
end
ololo

code

require 'rom-repository'

class UserRepo < ROM::Repository
  commands :create
end
ololo

teset