Created
July 30, 2012 10:54
-
-
Save jbbarth/3206162 to your computer and use it in GitHub Desktop.
Awful monkey patch for deface bug #59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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