mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Implement Serializer's scope
This commit is contained in:
@@ -31,8 +31,9 @@ module ActiveModel
|
||||
@object = object
|
||||
@root = options[:root] || self.class._root
|
||||
@root = self.class.root_name if @root == true
|
||||
@scope = options[:scope]
|
||||
end
|
||||
attr_accessor :object, :root
|
||||
attr_accessor :object, :root, :scope
|
||||
|
||||
alias read_attribute_for_serialization send
|
||||
|
||||
|
||||
Reference in New Issue
Block a user