Skip to content

Instantly share code, notes, and snippets.

@tetraf
Created May 20, 2013 12:21
Show Gist options
  • Save tetraf/5611901 to your computer and use it in GitHub Desktop.
Save tetraf/5611901 to your computer and use it in GitHub Desktop.
diff --git a/app/models/photo.rb b/app/models/photo.rb
index 32009d9..0f0ff89 100644
--- a/app/models/photo.rb
+++ b/app/models/photo.rb
@@ -350,9 +350,9 @@ class Photo < ActiveRecord::Base
def url(type)
if self.status == 'available'
- "http://#{SERVER_URL}/"+sys_filename(self.status,filename,type).gsub(/^public\//, '')
+ "/"+sys_filename(self.status,filename,type).gsub(/^public\//, '')
else
- "http://#{SERVER_URL}/"+sys_filename('processed',filename,type)
+ "/"+sys_filename('processed',filename,type)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment