Sha256: 4c33f8130256bfb1779733e8e9bdb259b3b9378e6e0df5715eb482a61d510490
Contents?: true
Size: 453 Bytes
Versions: 3
Compression:
Stored size: 453 Bytes
Contents
module Rooftop module ResourceLinks CUSTOM_LINK_RELATION_BASE = "http://docs.rooftopcms.com/link_relations" def self.included(base) # set up an attribute called resource_links, which is a collection of links # to other resources in the API. base.send(:after_find, ->(r) { if r.respond_to?(:"_links") r.resource_links = Rooftop::ResourceLinks::Collection.new(r._links) end }) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rooftop-0.0.6 | lib/rooftop/resource_links/resource_links.rb |
rooftop-0.0.5 | lib/rooftop/resource_links/resource_links.rb |
rooftop-0.0.3 | lib/rooftop/resource_links/resource_links.rb |