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.
@@ -1,5 +1,5 @@
1
1
  module ActiveModel
2
2
  class Serializer
3
- VERSION = "0.8.4.alpha2"
3
+ VERSION = "0.8.4.alpha3"
4
4
  end
5
5
  end
@@ -437,8 +437,10 @@ module ActiveModel
437
437
  method << " h = {}\n"
438
438
 
439
439
  _attributes.each do |name,key|
440
- puts "PARSING ATTRIBUTE: #{name} HIDDEN?: #{_hidden_attributes.include?(name)} INCLUDE?: #{include?(name)}"
441
- next if _hidden_attributes.include?(name) && !include?(name)
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gpi-active_model_serializers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4.alpha2
4
+ version: 0.8.4.alpha3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: