Forum: Ruby on Rails Converting decimal primary key to integer (oracle)

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Aeac27d9f81191536d3c86ee825d71b2?d=identicon&s=25 Don Mc (dmcclean)
on 2005-12-11 23:00
I am working with a legacy oracle database. The
primary key is not defined as an integer but as a number.
This results in a url with an id as a number, such as 1234.0 instead
of 1234. It works fine, but I would prefer 1234 to be displayed in
the url. I have attempted to redefine the model id method to
convert to an integer using to_i method, but no luck. Any ideas?

84161f131a41bf1b730a7a4fbfd9068d?d=identicon&s=25 Vaibhav Deshpande (vaibhavdeshpandemca)
on 2009-04-06 10:09
I am also having the same prob plz help me if u get the solution....
This topic is locked and can not be replied to.