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.
Don M. (Guest)
on 2005-12-12 00: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?

Vaibhav D. (Guest)
on 2009-04-06 12: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.