In S3FileField::FormHelper, delete the object from options hash if the object is a new record, as it will otherwise raise an "undefined method `gsub' for nil:NilClass" error for new records if the form is passed an instance rather than a symbol.