close

加到application.rb:

module ActiveSupport #:nodoc:
 module CoreExtensions #:nodoc:
   module Hash #:nodoc:
     module Conversions
       unless method_defined? :old_to_xml
         alias_method :old_to_xml, :to_xml
         def to_xml(options = {})
           options.merge!(:dasherize => false)
           old_to_xml(options)
         end
       end
     end
   end
   module Array #:nodoc:
     module Conversions
       unless method_defined? :old_to_xml
         alias_method :old_to_xml, :to_xml
         def to_xml(options = {})
           options.merge!(:dasherize => false)
           old_to_xml(options)
         end
       end
     end
   end
 end
end
module ActiveRecord #:nodoc:
 module XmlSerialization
   unless method_defined? :old_to_xml
     alias_method :old_to_xml, :to_xml
     def to_xml(options = {})
       options.merge!(:dasherize => false)
       old_to_xml(options)
     end
   end
 end
end
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Forth 的頭像
    Forth

    不就是個blog

    Forth 發表在 痞客邦 留言(0) 人氣()