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.11 lib/ddr/models/contact.rb
ddr-models-3.0.8 lib/ddr/models/contact.rb
ddr-models-3.0.7 lib/ddr/models/contact.rb
ddr-models-3.0.6 lib/ddr/models/contact.rb
ddr-models-3.0.5 lib/ddr/models/contact.rb
ddr-models-3.0.4 lib/ddr/models/contact.rb
ddr-models-3.0.3 lib/ddr/models/contact.rb
ddr-models-3.0.2 lib/ddr/models/contact.rb
ddr-models-3.0.1 lib/ddr/models/contact.rb
ddr-models-3.0.0 lib/ddr/models/contact.rb
ddr-models-3.0.0.rc6 lib/ddr/models/contact.rb
ddr-models-3.0.0.rc5 lib/ddr/models/contact.rb
ddr-models-3.0.0.rc4 lib/ddr/models/contact.rb
ddr-models-3.0.0.rc3 lib/ddr/models/contact.rb
ddr-models-3.0.0.rc2 lib/ddr/models/contact.rb
ddr-models-3.0.0.rc1 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.22 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.21 lib/ddr/models/contact.rb
ddr-models-2.4.10 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.20 lib/ddr/models/contact.rb