mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Adding doc for build_json method
This commit is contained in:
@@ -256,6 +256,10 @@ module ActiveModel
|
||||
end
|
||||
alias_method :root=, :root
|
||||
|
||||
# Used internally to create a new serializer object based on controller
|
||||
# settings and options for a given resource. These settings are typically
|
||||
# set during the request lifecycle or by the controller class, and should
|
||||
# not be manually defined for this method.
|
||||
def build_json(controller, resource, options)
|
||||
default_options = controller.send(:default_serializer_options) || {}
|
||||
options = default_options.merge(options || {})
|
||||
|
||||
Reference in New Issue
Block a user