Skip to content

Instantly share code, notes, and snippets.

@hubb
Created June 9, 2013 17:28
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 hubb/5744410 to your computer and use it in GitHub Desktop.
Save hubb/5744410 to your computer and use it in GitHub Desktop.
Patch for ree-1.8.7 and Haml 4.0.3 ~/.rbenv/versions/ree-1.8.7-2011.03/lib/ruby/gems/1.8/gems/haml-4.0.3/lib/haml/railtie.rb
diff --git a/Users/hubb/.rbenv/versions/ree-1.8.7-2011.03/lib/ruby/gems/1.8/gems/haml-4.0.3/lib/haml/railtie.rb b/Users/hubb/Desktop/railtie-patched.rb
index 4d3e34f..4e354a2 100644
--- a/Users/hubb/.rbenv/versions/ree-1.8.7-2011.03/lib/ruby/gems/1.8/gems/haml-4.0.3/lib/haml/railtie.rb
+++ b/Users/hubb/Desktop/railtie-patched.rb
@@ -1,22 +1,26 @@
if defined?(ActiveSupport)
require 'haml/template/options'
- ActiveSupport.on_load(:before_initialize) do
- ActiveSupport.on_load(:action_view) do
- require "haml/template"
+ if defined?(ActiveSupport.on_load)
+ ActiveSupport.on_load(:before_initialize) do
+ ActiveSupport.on_load(:action_view) do
+ require "haml/template"
+ end
end
end
end
-module Haml
- class Railtie < ::Rails::Railtie
- initializer :haml do |app|
- require "haml/template"
- if defined?(::Sass::Rails::SassTemplate) && app.config.assets.enabled
- require "haml/sass_rails_filter"
+if defined?(Rails::Railtie)
+ module Haml
+ class Railtie < ::Rails::Railtie
+ initializer :haml do |app|
+ require "haml/template"
+ if defined?(::Sass::Rails::SassTemplate) && app.config.assets.enabled
+ require "haml/sass_rails_filter"
+ end
end
end
end
end
-require "haml/helpers/safe_erubis_template"
-Haml::Filters::Erb.template_class = Haml::SafeErubisTemplate
\ No newline at end of file
+# require "haml/helpers/safe_erubis_template"
+# Haml::Filters::Erb.template_class = Haml::SafeErubisTemplate
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment