1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[ec2] fix volume model to not muck with attributes, which breaks mocks

This commit is contained in:
geemus 2010-04-27 13:39:37 -07:00
parent f344c2816e
commit c2b4983b9d

View file

@ -22,9 +22,6 @@ module Fog
def initialize(attributes = {})
# assign server first to prevent race condition with new_record?
self.server = attributes.delete(:server)
if attributes['attachmentSet']
attributes.merge!(attributes.delete('attachmentSet').first || {})
end
super
end
@ -67,6 +64,10 @@ module Fog
private
def attachmentSet=(new_attachment_set)
merge_attributes(new_attachment_set.first || {})
end
def attach(new_server)
if new_record?
@server = new_server