Skip to content

Commit

Permalink
Fix Issue 194.
Browse files Browse the repository at this point in the history
  • Loading branch information
amangale authored and bkeepers committed Sep 2, 2011
1 parent c16b203 commit 5957d7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mongo_mapper/plugins/keys.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def attributes=(attrs)

def attributes
HashWithIndifferentAccess.new.tap do |attrs|
keys.each_pair do |name, key|
keys.select { |name,key| !self[key.name].nil? }.each_pair do |name, key|
value = key.set(self[key.name])
attrs[name] = value
end
Expand Down Expand Up @@ -322,3 +322,4 @@ def write_key(name, value)
end
end
end

0 comments on commit 5957d7e

Please sign in to comment.