Magnus Holmlund wrote: > cinderedmonkey wrote: >> Hmm...strange. Well, not really strange as I understand what you are >> saying but it's strange that there is no full support. I would think >> that I am not the only one that would want to search from multiple >> tables... >> >> On Sep 4, 3:31�am, Frederick Cheung <[email protected]> > > Hi, > did you ever find a solution for this as I'm having exactly the same > problem as you describe here? Since the xml I'm producing is public I > cannot really change it and since I don't need the type (I use the > :skip_types option) I cannot understand why the code producing this > warning haven't been modified yet. I'm running rails 2.2.2. Well, any > input would be great.
Additional information: As for now I'm running this patch to avoid the problem. Not very nice but it works. Feel free to comment. #Removes a warning informing about type is deprecated #/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/serializers/xml_serializer.rb:308: warning: Object#type is deprecated;use Object#class #See http://rails.lighthouseapp.com/projects/8994/tickets/732-deprecation-warning-in-xml_serializer-rb-308 #and http://www.ruby-forum.com/topic/164048 module ActiveRecord #:nodoc: class XmlSerializer < ActiveRecord::Serialization::Serializer #:nodoc: class Attribute #:nodoc: def compute_type type = @record.class.serialized_attributes.has_key?(name) ? :yaml : (@record.class.columns_hash[name].nil? ? nil.class : @record.class.columns_hash[name].type) case type when :text :string when :time :datetime else type end end end end end -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

