Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #4716: test_validate_format_numeric_DB2_patch.diff

File test_validate_format_numeric_DB2_patch.diff, 0.7 kB (added by jeremy@hinegardner.org, 2 years ago)
  • activerecord/lib/active_record/connection_adapters/db2_adapter.rb

    old new  
    8989          @connection.set_auto_commit_on 
    9090        end 
    9191 
     92        def quote(value, column = nil) 
     93          if value.kind_of?(Numeric) and column and [:string, :text].include?(column.type) 
     94              "'#{value}'" 
     95          else 
     96            super 
     97          end 
     98        end 
     99 
    92100        def quote_column_name(column_name) 
    93101          column_name 
    94102        end