Skip to content

Commit

Permalink
bug fix for non absolute path on background img url
Browse files Browse the repository at this point in the history
  • Loading branch information
shwoodard committed Feb 3, 2011
1 parent b607fe1 commit 528668f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/active_assets/active_sprites/sprite_piece.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'rack/mount'

module ActiveAssets
module ActiveSprites
class SpritePiece
Expand Down Expand Up @@ -39,7 +41,7 @@ def to_css
{
width:#{width || "#{details.width}px"};
height:#{height || "#{details.height}px"};
background:url('#{details.sprite_path}') no-repeat #{x || "#{-details.x}px"} #{y || "#{-details.y}px"};
background:url('#{::Rack::Mount::Utils.normalize_path(details.sprite_path)}') no-repeat #{x || "#{-details.x}px"} #{y || "#{-details.y}px"};
display:block;
}
CSS
Expand Down

0 comments on commit 528668f

Please sign in to comment.