diff options
author | José Valim <jose.valim@gmail.com> | 2010-04-22 12:29:08 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-04-22 12:29:08 +0200 |
commit | 9476daa829f7dd0681121e042dd1356af0d50ca0 (patch) | |
tree | 906efeda77ef1d7891f7aaf12d831e2f71cf7069 /activerecord/lib | |
parent | 81fb742488e696ee7a7a8b1a620bc93deb1fad77 (diff) | |
download | rails-9476daa829f7dd0681121e042dd1356af0d50ca0.tar.gz rails-9476daa829f7dd0681121e042dd1356af0d50ca0.tar.bz2 rails-9476daa829f7dd0681121e042dd1356af0d50ca0.zip |
Speed up xml serializer by computing values just once and remove unecessary code duplication.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/serializers/xml_serializer.rb | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/activerecord/lib/active_record/serializers/xml_serializer.rb b/activerecord/lib/active_record/serializers/xml_serializer.rb index 2e85959b1e..255b03433d 100644 --- a/activerecord/lib/active_record/serializers/xml_serializer.rb +++ b/activerecord/lib/active_record/serializers/xml_serializer.rb @@ -182,17 +182,6 @@ module ActiveRecord #:nodoc: options[:except] |= Array.wrap(@serializable.class.inheritance_column) end - def serializable_attributes - serializable_attribute_names.collect { |name| Attribute.new(name, @serializable) } - end - - def serializable_method_attributes - Array.wrap(options[:methods]).inject([]) do |method_attributes, name| - method_attributes << MethodAttribute.new(name.to_s, @serializable) if @serializable.respond_to?(name.to_s) - method_attributes - end - end - def add_associations(association, records, opts) if records.is_a?(Enumerable) tag = reformat_name(association.to_s) |