defining json_key(root) as model class name

This commit is contained in:
João Moura 2015-07-10 12:02:17 -03:00 committed by João M. D. Moura
parent 6266b6a002
commit 418721302b

View File

@ -169,7 +169,7 @@ module ActiveModel
end end
def json_key def json_key
@root || self.class.root_name @root || object.class.model_name.to_s.downcase
end end
def id def id