Skip to content

Instantly share code, notes, and snippets.

@jbbarth
Created July 30, 2012 10:54
Show Gist options
  • Save jbbarth/3206162 to your computer and use it in GitHub Desktop.
Save jbbarth/3206162 to your computer and use it in GitHub Desktop.
Awful monkey patch for deface bug #59
# See: https://github.com/railsdog/deface/issues/59
ActionView::Template.class_eval do
def initialize_with_deface_patch(source, identifier, handler, details)
if handler.class.to_s.demodulize == "ERB"
initialize_without_deface_patch(source, identifier, handler, details)
else
initialize_without_deface(source, identifier, handler, details)
end
end
alias_method_chain :initialize, :deface_patch
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment