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.9 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.18 lib/ddr/models/contact.rb
ddr-models-2.4.8 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.17 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.16 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.15 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.14 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.13 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.12 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.11 lib/ddr/models/contact.rb
ddr-models-2.4.7 lib/ddr/models/contact.rb
ddr-models-2.4.6 lib/ddr/models/contact.rb
ddr-models-2.4.5 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.10 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.9 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.8 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.7 lib/ddr/models/contact.rb
ddr-models-2.4.4 lib/ddr/models/contact.rb
ddr-models-3.0.0.beta.6 lib/ddr/models/contact.rb
ddr-models-2.4.3 lib/ddr/models/contact.rb