Sha256: f98ce17e3ee0d3ba18faa6992d2694a0696aaa43a78c833a4169a4a80fcfef7a
Contents?: true
Size: 358 Bytes
Versions: 3
Compression:
Stored size: 358 Bytes
Contents
require 'activeresource' module Ddr class Contact < ActiveResource::Base self.site = ENV["DDR_AUX_API_URL"] def self.call(slug) new get(:find, slug: slug) rescue ActiveResource::ResourceNotFound => e raise Ddr::NotFoundError, e end def self.keys all.map(&:slug) end def to_s name end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ddr-core-0.3.0 | app/models/ddr/contact.rb |
ddr-core-0.2.2 | app/models/ddr/contact.rb |
ddr-core-0.2.1 | app/models/ddr/contact.rb |