title: undefined local variable or method `on' for #<ActionDispatch::Routing::Mapper:0x007fd3b4516a00>
body: <p>I am trying to replace the edit action of a controller with one having an extra parameter, but am getting:</p>
  
  <pre><code>undefined local variable or method `on' for #&lt;ActionDispatch::Routing::Mapper:0x007fd3b4516a00&gt;
  </code></pre>
  
  <p>Here is the routes.rb section:</p>
  
  <pre><code>resources :structures, except: :edit do
    get '/:doctype' =&gt; :edit, on: :edit
  end
  </code></pre>
  
  <p>The issue is :edit. Using another action like :new works perfectly.</p>