lib/i18n_alchemy/proxy.rb
def parse_attributes(attributes, options = {})
        attributes = attributes.stringify_keys

        @localized_attributes.each do |column_name, attribute|
          next unless attributes.key?(column_name)
          attributes[column_name] = attribute.parse(attributes[column_name])
        end
        @localized_associations.each do |association_parser|
          association_attributes = association_parser.association_name_attributes
          next unless attributes.key?(association_attributes)
          attributes[association_attributes] = association_parser.parse(attributes[association_attributes])
        end

        attributes
      end
# TODO: cannot assume _id is always a foreign key.
# Find a better way to find that and skip these columns.
cannot assume _id is always a foreign key.
Find a better way to find that and skip these columns.
cannot assume _id is always a foreign key . Find a better way to find that and skip these columns .
def parse_attributes(attributes, options = {})
        attributes = attributes.stringify_keys
        @localized_attributes.each do |column_name, attribute|
          next unless attributes.key?(column_name)
          attributes[column_name] = attribute.parse(attributes[column_name])
        end
        @localized_associations.each do |association_parser|
          association_attributes = association_parser.association_name_attributes
          next unless attributes.key?(association_attributes)
          attributes[association_attributes] = association_parser.parse(attributes[association_attributes])
        end
        attributes
      end
def parse_attributes ( attributes , options = { } ) attributes = attributes . stringify_keys @localized_attributes . each do | column_name , attribute | next unless attributes . key? ( column_name ) attributes [ column_name ] = attribute . parse ( attributes [ column_name ] ) end @localized_associations . each do | association_parser | association_attributes = association_parser . association_name_attributes next unless attributes . key? ( association_attributes ) attributes [ association_attributes ] = association_parser . parse ( attributes [ association_attributes ] ) end attributes end
TODO: cannot assume _id is always a foreign key.
TODO : cannot assume _id is always a foreign key .
attributes
options