lib/representable/hash/collection.rb in representable-3.0.4 vs lib/representable/hash/collection.rb in representable-3.1.0
- old
+ new
@@ -1,5 +1,7 @@
+require 'representable/hash'
+
module Representable::Hash
module Collection
include Representable::Hash
def self.included(base)
@@ -18,20 +20,20 @@
end
# TODO: revise lonely collection and build separate pipeline where we just use Serialize, etc.
def create_representation_with(doc, options, format)
- options = normalize_options(options)
+ options = normalize_options(**options)
options[:_self] = options
bin = representable_bindings_for(format, options).first
Collect[*bin.default_render_fragment_functions].
(represented, {doc: doc, fragment: represented, options: options, binding: bin, represented: represented})
end
def update_properties_from(doc, options, format)
- options = normalize_options(options)
+ options = normalize_options(**options)
options[:_self] = options
bin = representable_bindings_for(format, options).first
value = Collect[*bin.default_parse_fragment_functions].