Implement Serializer's scope

This commit is contained in:
Santiago Pastorino
2013-07-02 00:13:26 -07:00
parent c3f857d1b6
commit b6f9c5ee43
2 changed files with 37 additions and 1 deletions

View File

@@ -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