Skip to content
Browse files

Fixed a major bug in `attributes` (Model::Attribute was returned inst…

…ead of value)
  • Loading branch information...
1 parent 37aaad3 commit 81eb4c8eda0a3aa99cad145f5fd739747e88c732 @serebryakov serebryakov committed May 27, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/lib/model/base.rb
View
4 lib/lib/model/base.rb
@@ -494,7 +494,9 @@ def []=(name, value)
# @return [Hash] all attributes of an instance (name => value)
##
def attributes(*args)
- @attributes.merge(@arbitrary)
+ Hash[@attributes.keys.map do |name|
+ [ name, self[name] ]
+ end].merge(@arbitrary)
end
##

0 comments on commit 81eb4c8

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