On Apr 6, 9:10 am, Vaibhav Deshpande <rails-mailing-l...@andreas-
s.net> wrote:
> 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.
The thing used for urls etc. is the to_param method, you may have more
luck doing your coercing there.
Fred
>I have attempted to redefine the model id method to
> convert to an integer using to_i method, but no luck. Any ideas?
>
> Thanks,
> Vaibhav
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---