app/models/data_point.rb
def all_fields_exist
      conn = GeographicDatabase.connection
      messages = field_array.map do |field|
        unless conn.column_exists? "tabular.#{self.tables}", field
          "field #{field} in table #{self.tables} does not exist"
        end
      end
      messages.compact.each { |message| errors.add(:fields, message) }
    end
# TODO: I think this was imaginary? I don't think this actually does this.
I think this was imaginary. I don't think this actually does this.
I think this was imaginary . I don ' t think this actually does this .
def all_fields_exist
      conn = GeographicDatabase.connection
      messages = field_array.map do |field|
        unless conn.column_exists? "tabular.#{self.tables}", field
          "field #{field} in table #{self.tables} does not exist"
        end
      end
      messages.compact.each { |message| errors.add(:fields, message) }
    end
def all_fields_exist conn = GeographicDatabase . connection messages = field_array . map do | field | unless conn . column_exists? "tabular.#{self.tables}" , field "field #{field} in table #{self.tables} does not exist" end end messages . compact . each { | message | errors . add ( :fields , message ) } end
TODO: I think this was imaginary?
TODO : I think this was imaginary?