gpi-active_model_serializers 0.8.4.alpha1 → 0.8.4.alpha2

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.
@@ -99,6 +99,8 @@ module ActiveModel
99
99
  def hidden_attributes(*attrs)
100
100
  self._hidden_attributes.concat(attrs)
101
101
  attributes(*attrs)
102
+
103
+ puts "ADD HIDDEN: #{self._hidden_attributes}"
102
104
  end
103
105
 
104
106
  def attribute(attr, options={})
@@ -426,6 +428,8 @@ module ActiveModel
426
428
  # Returns a hash representation of the serializable
427
429
  # object attributes.
428
430
  def attributes
431
+ puts "PARSING ATTRIBUTES"
432
+
429
433
  _fast_attributes
430
434
  rescue NameError
431
435
  method = "def _fast_attributes\n"
@@ -433,11 +437,14 @@ module ActiveModel
433
437
  method << " h = {}\n"
434
438
 
435
439
  _attributes.each do |name,key|
440
+ puts "PARSING ATTRIBUTE: #{name} HIDDEN?: #{_hidden_attributes.include?(name)} INCLUDE?: #{include?(name)}"
436
441
  next if _hidden_attributes.include?(name) && !include?(name)
437
442
  method << " h[:\"#{key}\"] = read_attribute_for_serialization(:\"#{name}\") if include?(:\"#{name}\")\n"
438
443
  end
439
444
  method << " h\nend"
440
445
 
446
+ puts "METHOD: #{method}"
447
+
441
448
  self.class.class_eval method
442
449
  _fast_attributes
443
450
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveModel
2
2
  class Serializer
3
- VERSION = "0.8.4.alpha1"
3
+ VERSION = "0.8.4.alpha2"
4
4
  end
5
5
  end
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.alpha1
4
+ version: 0.8.4.alpha2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: