Re: SQLServer y fechas en W2000

Si funciono el cambio el cambio.

Asi quedo

C:\ruby\lib\ruby\gems\1.8\gems\activerecord-
1.14.2\lib\active_record\connection_adapters\sqlserver_adapter.rb
C:\ruby\lib\ruby\gems\1.8\gems\activerecord-
1.14.3\lib\active_record\connection_adapters\sqlserver_adapter.rb

def quote(value, column = nil)
case value
when String
if column && column.type == :binary &&
column.class.respond_to?
(:string_to_binary)
“’#{quote_string(column.class.string_to_binary(value))}’”
else
“’#{quote_string(value)}’”
end
when NilClass then “NULL”
when TrueClass then ‘1’
when FalseClass then ‘0’
when Float, Fixnum, Bignum then value.to_s
#when Date then “’#{value.to_s}’”
#when Time, DateTime then “’#{value.strftime(”%Y-%m-%d
%H:%M:%S")}’"
when Date, Time, DateTime then
“’#{value.strftime(”%d-%m-%Y
%H:%M:%S")}’"
else
“’#{quote_string(value.to_yaml)}’”
end
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs