This project is archived and is in readonly mode.
Hash#index is deprecated at 'rake routes'
Reported by Sasha Koss | May 15th, 2010 @ 12:46 PM
In 'rake routes' command used deprecated Hash#index (in 1.9.x):
http://github.com/rails/rails/blob/master/railties/lib/rails/tasks/...
name = Rails.application.routes.named_routes.routes.index(route).to_s
to fix it we should use Hash#key in 1.9.x (in 1.8.7 'key' method is not exist)
Comments and changes to this ticket
-
Sasha Koss May 15th, 2010 @ 01:10 PM
- Tag changed from rake routes, 1.9, bugmash, rails3 to rake routes, 1.9, bugmash, patch, rails3
I attached patch to this ticket
-
Enrico Bianco May 15th, 2010 @ 10:24 PM
+1
I've tested this in 1.8.7, 1.9.1, and 1.9.2-head by pushing it to a separate branch of my fork of rails and bringing it in to a sample application via bundler. No problems running 'rake routes' across all tested rubies.
-
Sasha Koss May 16th, 2010 @ 03:31 AM
- Assigned user set to José Valim
-
Repository May 16th, 2010 @ 01:35 PM
- State changed from new to resolved
(from [3e84ea014e9f4d0f8d302c9bf8ad04240eec2804]) Fix Hash#index deprecated warning in 1.9.x [#4600 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/3e84ea014e9f4d0f8d302c9bf8ad04... -
José Valim May 16th, 2010 @ 05:03 PM
- Tag changed from rake routes, 1.9, bugmash, patch, rails3 to rake routes, 1.9, patch, rails3
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
Attachments
Tags
Referenced by
- 4600 Hash#index is deprecated at 'rake routes' (from [3e84ea014e9f4d0f8d302c9bf8ad04240eec2804]) Fix Has...