root option is working (fixed #986)

This commit is contained in:
Marek Pietrucha
2015-07-06 16:50:25 +02:00
committed by vyrak bunleang
parent d7140949cd
commit e5ccb8e4dd
2 changed files with 20 additions and 1 deletions

View File

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