monkey patch to rails 3.1 image functions
This commit is contained in:
parent
7f8b6c29e0
commit
91aaa29df8
@ -3,3 +3,24 @@ module Sass::Script::Functions
|
||||
asset_url(path, Sass::Script::String.new("image"))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
module Compass::RailsImageFuctionPatch
|
||||
private
|
||||
|
||||
def image_path(image_file)
|
||||
if file = Rails.application.assets.find_asset(image_file)
|
||||
return file
|
||||
end
|
||||
super(image_file)
|
||||
end
|
||||
end
|
||||
|
||||
module Sass::Script::Functions
|
||||
include Compass::RailsImageFuctionPatch
|
||||
end
|
||||
|
||||
# Wierd that this has to be re-included to pick up sub-modules. Ruby bug?
|
||||
class Sass::Script::Functions::EvaluationContext
|
||||
include Sass::Script::Functions
|
||||
end
|
Loading…
Reference in New Issue
Block a user