Sha256: d0adba30250ec0c8ab1936360bda25d25b1e795b45ad20774826ac19a694ac4f

Contents?: true

Size: 215 Bytes

Versions: 6

Compression:

Stored size: 215 Bytes

Contents

class Users < ROM::Relation[:sql]
  gateway :sql
  schema(:users, infer: true)

  def by_id(id)
    where(id: id)
  end

  def index
    order(:name)
  end

  def by_name(name)
    index.where(name: name)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rom-rails-2.4.0 spec/dummy/app/relations/users.rb
rom-rails-2.3.1 spec/dummy/app/relations/users.rb
rom-rails-2.3.0 spec/dummy/app/relations/users.rb
rom-rails-2.2.0 spec/dummy/app/relations/users.rb
rom-rails-2.0.0 spec/dummy/app/relations/users.rb
rom-rails-1.2.0 spec/dummy/app/relations/users.rb