Skip to content
Browse files

Adding :id exception in `get_attribute` for more consistent behavior

  • Loading branch information...
1 parent f167599 commit 8fa2c93ceeed665f9caf3835ef7f93cb9fe08af6 @serebryakov serebryakov committed May 28, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/lib/model/base.rb
View
3 lib/lib/model/base.rb
@@ -634,6 +634,9 @@ def id=(value) #nodoc
# object, like Date.new(2004, 12, 12)).
##
def get_attribute(name, *args, &block) #nodoc
+ if name == :id
+ return @id
+ end
if @attributes.key?(name)
@attributes[name].object(*args, &block)
else

0 comments on commit 8fa2c93

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