This project is archived and is in readonly mode.

#4054 ✓invalid
Samuel Danielson

ActiveRecord casts everything to a string when Arel select is used.

Reported by Samuel Danielson | February 25th, 2010 @ 02:59 PM

I can reproduce this behavior with both sqlite and postgresql in rails 3.0.0.beta1.

>> AnyModel.select('1.0 as t').first.t
=> "1.0"

>> AnyModel.select('1 as t').first.t
=> "1"

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages