Created
September 15, 2009 08:31
-
-
Save kamal/187182 to your computer and use it in GitHub Desktop.
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
module ActiveResource | |
class Base | |
def to_xml_with_methods(options) | |
methods = Array(options.delete(:methods)) | |
methods.each do |m| | |
attributes[m] = send(m) | |
end | |
to_xml_without_methods(options) | |
end | |
alias_method_chain :to_xml, :methods | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment