Skip to content

Commit

Permalink
Fixed a major bug in attributes (Model::Attribute was returned inst…
Browse files Browse the repository at this point in the history
…ead of value)
  • Loading branch information
serebryakov committed May 27, 2010
1 parent 37aaad3 commit 81eb4c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/lib/model/base.rb
Expand Up @@ -494,7 +494,9 @@ def []=(name, value)
# @return [Hash] all attributes of an instance (name => value) # @return [Hash] all attributes of an instance (name => value)
## ##
def attributes(*args) def attributes(*args)
@attributes.merge(@arbitrary) Hash[@attributes.keys.map do |name|
[ name, self[name] ]
end].merge(@arbitrary)
end end


## ##
Expand Down

0 comments on commit 81eb4c8

Please sign in to comment.