gpi-active_model_serializers 0.8.3.alpha1 → 0.8.3.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.
@@ -66,13 +66,16 @@ module ActiveModel
66
66
  attr_reader :embed_key, :serializer_class, :options, :serializer_options
67
67
 
68
68
  def find_serializable(object)
69
- puts ">>>>>>> find_serializable <<<<<< #{serializer_options} <<<"
70
-
71
69
  if serializer_class
72
- puts ">>>>>>> a <<<<<<"
73
- serializer_class.new(object, serializer_options)
70
+ options = serializer_options.except(:only, :include)
71
+
72
+ if serializer_options[:include].present? && serializer_options[:include][name].present?
73
+ options.merge!(serializer_options[:include][name])
74
+ end
75
+
76
+ serializer_class.new(object, options)
74
77
  elsif object.respond_to?(:active_model_serializer) && (ams = object.active_model_serializer)
75
- puts ">>>>>>> b <<<<<<"
78
+
76
79
  options = serializer_options.except(:only, :include)
77
80
 
78
81
  if serializer_options[:include].present? && serializer_options[:include][name].present?
@@ -81,7 +84,6 @@ module ActiveModel
81
84
 
82
85
  ams.new(object, options)
83
86
  else
84
- puts ">>>>>>> c <<<<<<"
85
87
  object
86
88
  end
87
89
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveModel
2
2
  class Serializer
3
- VERSION = "0.8.3.alpha1"
3
+ VERSION = "0.8.3.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.3.alpha1
4
+ version: 0.8.3.alpha2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: