gpi-active_model_serializers 0.8.4.alpha2 → 0.8.4.alpha3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -437,8 +437,10 @@ module ActiveModel
|
|
437
437
|
method << " h = {}\n"
|
438
438
|
|
439
439
|
_attributes.each do |name,key|
|
440
|
-
|
441
|
-
|
440
|
+
explicitly_included = @options.key?(:only) && Array(@options[:only]).include?(name)
|
441
|
+
|
442
|
+
puts "PARSING ATTRIBUTE: #{name} HIDDEN?: #{_hidden_attributes.include?(name)} INCLUDE?: #{explicitly_included}"
|
443
|
+
next if _hidden_attributes.include?(name) && !explicitly_included
|
442
444
|
method << " h[:\"#{key}\"] = read_attribute_for_serialization(:\"#{name}\") if include?(:\"#{name}\")\n"
|
443
445
|
end
|
444
446
|
method << " h\nend"
|