We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5acd98e + 447d969 commit 784eccdCopy full SHA for 784eccd
lib/action_controller/serialization.rb
@@ -45,13 +45,15 @@ def serialization_scope(scope)
45
end
46
47
48
- def _render_option_json(resource, options)
49
- serializer = build_json_serializer(resource, options)
50
-
51
- if serializer
52
- super(serializer, options)
53
- else
54
- super
+ [:_render_option_json, :_render_with_renderer_json].each do |renderer_method|
+ define_method renderer_method do |resource, options|
+ serializer = build_json_serializer(resource, options)
+
+ if serializer
+ super(serializer, options)
+ else
55
+ super(resource, options)
56
+ end
57
58
59
0 commit comments