Module: Transmutation::Serialization::Rendering
- Defined in:
- lib/transmutation/serialization/rendering.rb
Instance Method Summary collapse
-
#render(json: nil, serialize: true, namespace: nil, serializer: nil, max_depth: 1, **args) ⇒ Object
Serializes the value of the ‘json` parameter before calling the existing render method.
Instance Method Details
#render(json: nil, serialize: true, namespace: nil, serializer: nil, max_depth: 1, **args) ⇒ Object
Serializes the value of the ‘json` parameter before calling the existing render method.
7 8 9 10 11 12 |
# File 'lib/transmutation/serialization/rendering.rb', line 7 def render(json: nil, serialize: true, namespace: nil, serializer: nil, max_depth: 1, **args) return super(**args) unless json return super(**args, json:) unless serialize super(**args, json: serialize(json, namespace:, serializer:, max_depth:)) end |