summaryrefslogtreecommitdiff
path: root/ext/json/lib/json/add/rails.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/lib/json/add/rails.rb')
-rw-r--r--ext/json/lib/json/add/rails.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/json/lib/json/add/rails.rb b/ext/json/lib/json/add/rails.rb
index 8ce85efe57e..e86ed1aab94 100644
--- a/ext/json/lib/json/add/rails.rb
+++ b/ext/json/lib/json/add/rails.rb
@@ -10,7 +10,7 @@ class Object
def self.json_create(object)
obj = new
for key, value in object
- next if key == JSON.create_id
+ next if key == 'json_class'
instance_variable_set "@#{key}", value
end
obj
@@ -18,7 +18,7 @@ class Object
def to_json(*a)
result = {
- JSON.create_id => self.class.name
+ 'json_class' => self.class.name
}
instance_variables.inject(result) do |r, name|
r[name[1..-1]] = instance_variable_get name