daily pastebin goal
21%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module ActiveResource
  2.   class Base
  3.     def to_xml_with_methods(options)
  4.       methods = Array(options.delete(:methods))
  5.       methods.each do |m|
  6.         attributes[m] = send(m)
  7.       end
  8.       to_xml_without_methods(options)
  9.     end
  10.     alias_method_chain :to_xml, :methods
  11.   end
  12. end
RAW Paste Data
Top