mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Merge pull request #632 from gauthier-delacroix/Default_namespace_inheritance
Default namespace option
This commit is contained in:
@@ -80,6 +80,7 @@ module ActionController
|
||||
|
||||
def build_json_serializer(resource, options = {})
|
||||
options = default_serializer_options.merge(options)
|
||||
@namespace_for_serializer = options.fetch(:namespace, nil)
|
||||
|
||||
if serializer = options.fetch(:serializer, default_serializer(resource))
|
||||
options[:scope] = serialization_scope unless options.has_key?(:scope)
|
||||
|
||||
Reference in New Issue
Block a user