This project is archived and is in readonly mode.

#4006 ✓invalid
trevor

routes controller block raises "missing :action" arbitrarily between symbol / string

Reported by trevor | February 20th, 2010 @ 03:34 AM

  controller :posts do
    match 'people' => :people,  :as => 'people' # works
  end
  controller :posts do
    match 'people' => :people,  :as => :people  # works
  end
  controller :posts do
    match :people  => :people,  :as => :people  # raises error - "missing :action"
  end
  controller :posts do
    match 'people' => 'people', :as => :people  # raises error - "missing :action"
  end

Comments and changes to this ticket

  • José Valim

    José Valim February 21st, 2010 @ 11:55 AM

    • Assigned user set to “josh”
  • josh

    josh February 22nd, 2010 @ 05:02 PM

    • State changed from “new” to “invalid”

    Both cases are invalid although the #3 error message is bad. Paths must be strings and actions must be symbols if they are standalone. You can't use strings <=> symbols where ever you want, they mean different things in the new dsl.

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

Pages