Skip to content

Commit

Permalink
Fixed Constructor Method
Browse files Browse the repository at this point in the history
  • Loading branch information
plribeiro3000 committed Sep 9, 2014
1 parent b0d9ce5 commit d80f369
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/fog/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def set_attribute(name, *val)

def save(extra_params = {})
require_creation_attributes
ref = service.send("create_#{provider_class.downcase}", all_associations_and_attributes, extra_params)
attrs = all_associations_and_attributes.reject { |_key, value| value.nil? }
ref = service.send("create_#{provider_class.downcase}", attrs, extra_params)
merge_attributes collection.get(ref).attributes
true
end
Expand Down

0 comments on commit d80f369

Please sign in to comment.