lib/roar/json.rb in roar-1.0.4 vs lib/roar/json.rb in roar-1.1.0
- old
+ new
@@ -35,21 +35,21 @@
module ClassMethods
# TODO: move to instance method, or remove?
def links_definition_options
# FIXME: this doesn't belong into the generic JSON representer.
{
- :collection => true,
- :class => Hypermedia::Hyperlink,
- :extend => HyperlinkRepresenter,
- :exec_context => :decorator,
+ class: Hypermedia::Hyperlink,
+ decorator: HyperlinkDecorator,
+ collection: true,
+ exec_context: :decorator
}
end
end
require "representable/json/hash"
# Represents a hyperlink in standard roar+json hash representation.
- module HyperlinkRepresenter
+ class HyperlinkDecorator < Representable::Decorator
include Representable::JSON::Hash
end
end
end