144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
# File 'lib/chikken_in_a_bukket.rb', line 144
def post
begin
@bucket = Config.connection.create_bucket(@input[:bucket])
@objs = []
return redirect(Buckets, @bucket.name)
rescue S33r::S3Exception::S3OriginatedException => e
@buckets = Config.connection.bucket_names
if e.s3_code == 'BucketAlreadyExists'
@flash = "Sorry, the bucket #{@input[:bucket]} already exists. Try another name."
else
@flash = "Error #{e.s3_message}"
end
render :index
end
end
|