Sha256: 8ba905abb7ea39e4d780eb1fb6eaa0b655d73a20f445b77798ae8449effb9c7a

Contents?: true

Size: 388 Bytes

Versions: 38

Compression:

Stored size: 388 Bytes

Contents

require 'active_record/serializers/xml_serializer'

ActiveRecord::XmlSerializer::Attribute.class_eval do
  def compute_type_with_translations
    klass = @serializable.class
    if klass.translates? && klass.translated_attribute_names.include?(name.to_sym)
      :string
    else
      compute_type_without_translations
    end
  end
  alias_method_chain :compute_type, :translations
end

Version data entries

38 entries across 38 versions & 7 rubygems

Version Path
single_table_globalize3-0.0.5 lib/patches/active_record/xml_attribute_serializer.rb
single_table_globalize3-0.0.4 lib/patches/active_record/xml_attribute_serializer.rb
single_table_globalize3-0.0.2 lib/patches/active_record/xml_attribute_serializer.rb
single_table_globalize3-0.0.1 lib/patches/active_record/xml_attribute_serializer.rb
globalize3-0.3.0 lib/patches/active_record/xml_attribute_serializer.rb
hooktstudios-globalize3-0.2.0.beta8 lib/patches/active_record/xml_attribute_serializer.rb
globalize3-0.2.0 lib/patches/active_record/xml_attribute_serializer.rb
globalize3-0.2.0.beta8 lib/patches/active_record/xml_attribute_serializer.rb
globalize3-0.2.0.beta7 lib/patches/active_record/xml_attribute_serializer.rb
globalize3-0.2.0.beta6 lib/patches/active_record/xml_attribute_serializer.rb
galetahub-globalize3-0.2.1 lib/patches/active_record/xml_attribute_serializer.rb
globalize3-0.2.0.beta4 lib/patches/active_record/xml_attribute_serializer.rb
globalize3-0.2.0.beta3 lib/patches/active_record/xml_attribute_serializer.rb
globalize3-0.2.0.beta1 lib/patches/active_record/xml_attribute_serializer.rb
globalize3-0.1.0 lib/patches/active_record/xml_attribute_serializer.rb
globalize3-0.1.0.beta2 lib/patches/active_record/xml_attribute_serializer.rb
globalize3-jovoto-0.1.0.beta lib/patches/active_record/xml_attribute_serializer.rb
globalize3-0.1.0.beta lib/patches/active_record/xml_attribute_serializer.rb