From 151a57cc93f02e06b6d2b5f55e4acbd79ad69069 Mon Sep 17 00:00:00 2001 From: Uiri Date: Sun, 26 Sep 2010 11:47:34 -0400 Subject: [PATCH] well, that explains why it was adding the url variable. Fixed so that now new pictures work too. --- app/controllers/users_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 7041066bd..13d97479c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -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] == '/' - params[:profile][:image_url] = params[:profile][:image_url] + 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