Skip to content

Commit

Permalink
Remove protocol and server name from photo.url.
Browse files Browse the repository at this point in the history
Applying @tetraf's patch. Closes johnmckerrell#31.
  • Loading branch information
alexandre-mbm committed Mar 13, 2014
1 parent 8536be6 commit 4e87ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/photo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@ def update_status( new_status )

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

Expand Down

0 comments on commit 4e87ef2

Please sign in to comment.