Skip to content
Browse files

Changing `attributes` and `properties` to include ID

  • Loading branch information...
1 parent d32895e commit 642211c72af8296b7c2f22774dac7bb9b3252729 @serebryakov serebryakov committed May 27, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/lib/model/base.rb
View
4 lib/lib/model/base.rb
@@ -496,7 +496,7 @@ def []=(name, value)
def properties(*args)
Hash[self.class.properties.keys.map do |name|
[ name, self[name] ]
- end].merge(@arbitrary)
+ end].merge(@arbitrary).merge({ :id => id })
end
##
@@ -508,7 +508,7 @@ def properties(*args)
def attributes(*args)
Hash[@attributes.keys.map do |name|
[ name, self[name] ]
- end].merge(@arbitrary)
+ end].merge(@arbitrary).merge({ :id => id })
end
##

0 comments on commit 642211c

Please sign in to comment.
Something went wrong with that request. Please try again.