lib/jsonapionify/api/resource/definitions/attributes.rb in jsonapionify-0.11.11 vs lib/jsonapionify/api/resource/definitions/attributes.rb in jsonapionify-0.12.0
- old
+ new
@@ -6,11 +6,11 @@
extend JSONAPIonify::InheritedAttributes
extend JSONAPIonify::Types
inherited_array_attribute :attributes
delegate :id_attribute, :attributes, to: :class
- context(:fields, readonly: true) do |context|
- context.params['fields']&.map do |type, fields|
+ context(:fields, readonly: true) do |params:|
+ params['fields']&.map do |type, fields|
[type, fields.split(',')]
end&.to_h
end
end
end