lib/globalize/localization/db_translate.rb
# Returns copy of the attributes hash where all the values have been safely quoted for use in
# an SQL statement.
# REDEFINED to include only untranslated fields. We don't want to overwrite the
# base translation with other translations.
Returns copy of the attributes hash where all the values have been safely quoted for use in
an SQL statement.
REDEFINED to include only untranslated fields. We don't want to overwrite the
base translation with other translations.
Returns copy of the attributes hash where all the values have been safely quoted for use in an SQL statement . REDEFINED to include only untranslated fields . We don ' t want to overwrite the base translation with other translations .
def attributes_with_quotes(include_primary_key = true, include_readonly_attributes = true, attribute_names = @attributes.keys)
          quoted = {}
          connection = self.class.connection
          if Locale.base?
            attribute_names.each do |name|
              if column = column_for_attribute(name)
                quoted[name] = connection.quote(read_attribute(name), column) unless !include_primary_key && column.primary
              end
            end
          else
            attribute_names.each do |name|
              if !self.class.globalize_facets_hash.has_key?(name) && column = column_for_attribute(name)
                quoted[name] = connection.quote(read_attribute(name), column) unless !include_primary_key && column.primary
              end
            end
          end
	        include_readonly_attributes ? quoted : remove_readonly_attributes(quoted)
        end
def attributes_with_quotes ( include_primary_key = true , include_readonly_attributes = true , attribute_names = @attributes . keys ) quoted = { } connection = self . class . connection if Locale . base? attribute_names . each do | name | if column = column_for_attribute ( name ) quoted [ name ] = connection . quote ( read_attribute ( name ) , column ) unless ! include_primary_key && column . primary end end else attribute_names . each do | name | if ! self . class . globalize_facets_hash . has_key? ( name ) && column = column_for_attribute ( name ) quoted [ name ] = connection . quote ( read_attribute ( name ) , column ) unless ! include_primary_key && column . primary end end end include_readonly_attributes ? quoted : remove_readonly_attributes ( quoted ) end
Returns copy of the attributes hash where all the values have been safely quoted for use in
an SQL statement.
Returns copy of the attributes hash where all the values have been safely quoted for use in an SQL statement .
include_primary_key
<not_specific>
include_readonly_attributes
<not_specific>
attribute_names
<not_specific>
keys
<not_specific>