Skip to content

Instantly share code, notes, and snippets.

@jmcervera
Created September 1, 2016 11:02
Show Gist options
  • Save jmcervera/4510bf17af62de6238ece8d29310364a to your computer and use it in GitHub Desktop.
Save jmcervera/4510bf17af62de6238ece8d29310364a to your computer and use it in GitHub Desktop.
require 'repository'
module Persistence
module Couch
module Repositories
class Agencies < Repository[:agencies]
def find_id(id)
agencies.find_id(id)
end
end
end
end
end
module Persistence
module Couch
module Relations
class Agencies < ROM::Relation[:couchdb]
def find_id(id)
find_by_id(id)
end
def find_view(name, params)
find_by_view(name, params)
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment