Skip to content

Commit

Permalink
Quick and dirty patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesc Esplugas committed Feb 21, 2010
1 parent 34d3504 commit 9c148b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/helpers/admin/form_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,12 @@ def typus_preview(item, attribute)
file_preview_is_image = item.send("#{attachment}_content_type") =~ /^image\/.+/

href = if has_file_preview
item.send(attachment).url(file_preview)
url = item.send(attachment).url(file_preview)
if ActionController::Base.relative_url_root
ActionController::Base.relative_url_root + url
else
url
end
else
item.send(attachment).url
end
Expand Down

0 comments on commit 9c148b4

Please sign in to comment.