Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Hash#index is deprecated at 'rake routes'

#4600

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)

Reported by Sasha Koss · May 15th, 2010 @ 12:46 PM

State: resolved
Milestone: none
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Sasha Koss
    Sasha Koss
    • Tag changed from rake routes, 1.9, bugmash, rails3 to rake routes, 1.9, bugmash, patch, rails3

    I attached patch to this ticket

    May 15th, 2010 @ 01:10 PM

  2. Sasha Koss
    Sasha Koss

    In attach updated diff with valid commit name *

    May 15th, 2010 @ 02:18 PM

  3. Anil Wadghule
    Anil Wadghule

    +1

    Looks fine to me. Works find for 1.8.7 and 1.9.2.

    May 15th, 2010 @ 06:37 PM

  4. Colin Casey
  5. Enrico Bianco
    Enrico Bianco

    +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.

    May 15th, 2010 @ 10:24 PM

  6. Sasha Koss
    Sasha Koss
    • Assigned user set to José Valim

    May 16th, 2010 @ 03:31 AM

  7. Bastes
  8. Repository
  9. José Valim
    José Valim
    • Tag changed from rake routes, 1.9, bugmash, patch, rails3 to rake routes, 1.9, patch, rails3

    May 16th, 2010 @ 05:03 PM