gpi-active_model_serializers 0.8.4.alpha2 → 0.8.4.alpha3
Sign up to get free protection for your applications and to get access to all the features.
@@ -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"
|