This project is archived and is in readonly mode.
Route generator does not work with to_param returning a Fixnum
Reported by Piotr Usewicz | November 19th, 2008 @ 01:44 PM | in 2.x
class Shop
def to_param
1
end
end
map.resources :shops
form_for Shop.new => TypeError: can't convert Fixnum into String
Comments and changes to this ticket
-
DHH November 19th, 2008 @ 01:48 PM
- Assigned user changed from DHH to josh
-
Michael Koziarski November 19th, 2008 @ 04:16 PM
I'm not sure this patch covers every other case which could possibly go wrong when a fixnum is passed instead of a string.
My preference is to require people return strings.
-
josh November 19th, 2008 @ 11:13 PM
- Assigned user changed from josh to Michael Koziarski
-
CancelProfileIsBroken March 7th, 2009 @ 02:50 PM
- State changed from new to wontfix
Error message is clear, to_param documentation is clear ("Returns a String"), agreed we should continue to require strings to hit the routing code.
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>