well, that explains why it was adding the url variable. Fixed so that now new pictures work too.
This commit is contained in:
parent
ceb4f71714
commit
151a57cc93
1 changed files with 6 additions and 2 deletions
|
|
@ -26,11 +26,15 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
private
|
private
|
||||||
def prep_image_url(params)
|
def prep_image_url(params)
|
||||||
|
url = APP_CONFIG[:pod_url].chop if APP_CONFIG[:pod_url][-1,1] == '/'
|
||||||
if params[:profile][:image_url].empty?
|
if params[:profile][:image_url].empty?
|
||||||
params[:profile].delete(:image_url)
|
params[:profile].delete(:image_url)
|
||||||
else
|
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]
|
params[:profile][:image_url] = params[:profile][:image_url]
|
||||||
|
else
|
||||||
|
params[:profile][:image_url] = url + params[:profile][:image_url]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue