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

give a more useful error if someone tries to say connection.directories.create('dir')

This commit is contained in:
Joseph Anthony Pasquale Holsten 2011-04-22 16:00:52 -05:00
parent 8654131256
commit 5d547d1ee8

View file

@ -94,6 +94,7 @@ module Fog
end
def new(attributes = {})
raise ArgumentError, "Initialization parameters must be an attributes hash, got #{attributes.inspect}" unless attributes.respond_to? :merge
model.new(
attributes.merge(
:collection => self,