well, that explains why it was adding the url variable. Fixed so that now new pictures work too.

This commit is contained in:
Uiri 2010-09-26 11:47:34 -04:00
parent ceb4f71714
commit 151a57cc93

View file

@ -26,11 +26,15 @@ class UsersController < ApplicationController
private
def prep_image_url(params)
url = APP_CONFIG[:pod_url].chop if APP_CONFIG[:pod_url][-1,1] == '/'
if params[:profile][:image_url].empty?
params[:profile].delete(:image_url)
else
url = APP_CONFIG[:pod_url].chop if APP_CONFIG[:pod_url][-1,1] == '/'
if /^http:\/\// =~ params[:profile][:image_url]
params[:profile][:image_url] = params[:profile][:image_url]
else
params[:profile][:image_url] = url + params[:profile][:image_url]
end
end
end