Sha256: a5fc2ef57c6f9ebc3c996d5a759da5ada10cdaaf85d181f214ecd094b4a9baaa

Contents?: true

Size: 326 Bytes

Versions: 49

Compression:

Stored size: 326 Bytes

Contents

require "active_resource"

module Ddr::Models
  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::Models::NotFoundError, e
    end

    def to_s
      name
    end

  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
ddr-models-2.4.2 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.4 lib/ddr/models/contact.rb
ddr-models-2.4.1 lib/ddr/models/contact.rb
ddr-models-2.4.0 lib/ddr/models/contact.rb
ddr-models-2.4.0.rc6 lib/ddr/models/contact.rb
ddr-models-2.4.0.rc5 lib/ddr/models/contact.rb
ddr-models-2.4.0.rc4 lib/ddr/models/contact.rb
ddr-models-2.4.0.rc3 lib/ddr/models/contact.rb
ddr-models-2.4.0.rc2 lib/ddr/models/contact.rb