Created
October 29, 2012 11:50
-
-
Save elhu/3973143 to your computer and use it in GitHub Desktop.
Method missing with module
This file contains 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
def method_missing(method, *args, &block) | |
begin | |
super | |
rescue NoMethodError => e | |
warn("Warning: Unknown field or method #{method} for object #{self.inspect}\nBacktrace:\n#{e.backtrace.join("\n")}") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment