lib/contentful/fields_resource.rb
def fields_with_locales
      remapped_fields = {}
      locales.each do |locale|
        fields(locale).each do |name, value|
          remapped_fields[name] ||= {}
          remapped_fields[name][locale.to_sym] = value
        end
      end

      remapped_fields
    end
def fields_with_locales
      remapped_fields = {}
      locales.each do |locale|
        fields(locale).each do |name, value|
          remapped_fields[name] ||= {}
          remapped_fields[name][locale.to_sym] = value
        end
      end

      remapped_fields
    end
def fields_with_locales remapped_fields = { } locales . each do | locale | fields ( locale ) . each do | name , value | remapped_fields [ name ] ||= { } remapped_fields [ name ] [ locale . to_sym ] = value end end remapped_fields end
Returns all fields of the asset with locales nested by field

 @return [Hash] fields for Resource grouped by field name
Returns all fields of the asset with locales nested by field