mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Add AC::Serialization#serialization_scope as a class level method
This commit is contained in:
@@ -34,6 +34,12 @@ module ActionController
|
||||
self._serialization_scope = :current_user
|
||||
end
|
||||
|
||||
module ClassMethods
|
||||
def serialization_scope(scope)
|
||||
self._serialization_scope = scope
|
||||
end
|
||||
end
|
||||
|
||||
def _render_option_json(resource, options)
|
||||
serializer = build_json_serializer(resource, options)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user