Skip to content

Instantly share code, notes, and snippets.

@scottwb
Created April 19, 2014 03:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottwb/11072755 to your computer and use it in GitHub Desktop.
Save scottwb/11072755 to your computer and use it in GitHub Desktop.
Workaround for Haml issue #645
# This is a workaround for the Haml bug:
#
# https://github.com/haml/haml/issues/645
#
module Haml
module Filters
class SassRailsTemplate
def render(scope=Object.new, locals={}, &block)
scope = ::Rails.application.assets.context_class.new(
"::Rails.application.assets",
Pathname.new("/"), # It is really only these two lines that
Pathname.new("/") # seem to be the bug.
)
super
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment