lib/representable/serializer.rb in representable-2.4.0.rc3 vs lib/representable/serializer.rb in representable-2.4.0.rc4

- old
+ new

@@ -35,14 +35,14 @@ options[:binding].evaluate_option(:serialize, input, options) end Serialize = ->(input, options) do return if input.nil? # DISCUSS: how can we prevent that? - binding, user_options = options[:binding], options[:user_options] + binding, options = options[:binding], options[:options] # FIXME: rename to :local_options. - user_options = user_options.merge(wrap: binding[:wrap]) unless binding[:wrap].nil? # DISCUSS: can we leave that here? + options_for_nested = OptionsForNested.(options, binding) - input.send(binding.serialize_method, user_options) + input.send(binding.serialize_method, options_for_nested) end WriteFragment = ->(input, options) { options[:binding].write(options[:doc], input, options[:as]) } As = ->(input, options) { options[:binding].evaluate_option(:as, input, options) } \ No newline at end of file