diff --git a/lib/grape-active_model_serializers/formatter.rb b/lib/grape-active_model_serializers/formatter.rb index 50fba60..87f2b11 100644 --- a/lib/grape-active_model_serializers/formatter.rb +++ b/lib/grape-active_model_serializers/formatter.rb @@ -17,7 +17,7 @@ def fetch_serializer(resource, env) options = build_options_from_endpoint(endpoint) if serializer = options.fetch(:serializer, ActiveModel::Serializer.serializer_for(resource)) - options[:scope] = endpoint.serialization_scope unless options.has_key?(:scope) + options[:scope] = endpoint unless options.has_key?(:scope) # ensure we have an root to fallback on options[:resource_name] = default_root(endpoint) if resource.respond_to?(:to_ary) serializer.new(resource, options.merge(other_options))