mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 23:06:50 +00:00
Support Rails 4.2.0 with AMS 0.9
This patch is the same fixes as #655 and #663 for 0-9-stable branch.
This commit is contained in:
parent
5acd98e61b
commit
447d96923f
@ -45,13 +45,15 @@ module ActionController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def _render_option_json(resource, options)
|
[:_render_option_json, :_render_with_renderer_json].each do |renderer_method|
|
||||||
serializer = build_json_serializer(resource, options)
|
define_method renderer_method do |resource, options|
|
||||||
|
serializer = build_json_serializer(resource, options)
|
||||||
|
|
||||||
if serializer
|
if serializer
|
||||||
super(serializer, options)
|
super(serializer, options)
|
||||||
else
|
else
|
||||||
super
|
super(resource, options)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user