title: Route (path) working in console but not in the view
body: <p>The following code in my view/helper errors out with an invalid object, but when I run the same code in the console it seems to work. I appreciate any help that you can provide. </p>
  
  <p><strong>This does not work --</strong></p>
  
  <pre><code>2.2.1 :032 &gt; purchase_orders.map do |purchase_order|
  2.2.1 :033 &gt;      [ERB::Util.h(purchase_order.name),
  2.2.1 :034 &gt;       ERB::Util.h(purchase_order.descr),
  2.2.1 :035 &gt;       link_to("Copy PO", purchase_order_copy_path(purchase_order))]
  2.2.1 :036?&gt;   end
  
  NoMethodError: undefined method `purchase_order_copy_path' for main:Object
      from (irb):36:in `block in irb_binding'
      from /home/a/.rvm/gems/ruby-2.2.1/gems/activerecord-4.0.13/lib/active_record/relation/delegation.rb:13:in `map'
      from /home/a/.rvm/gems/ruby-2.2.1/gems/activerecord-4.0.13/lib/active_record/relation/delegation.rb:13:in `map'
      from (irb):32
      from /home/a/.rvm/gems/ruby-2.2.1/gems/railties-4.0.13/lib/rails/commands/console.rb:90:in `start'
      from /home/a/.rvm/gems/ruby-2.2.1/gems/railties-4.0.13/lib/rails/commands/console.rb:9:in `start'
      from /home/a/.rvm/gems/ruby-2.2.1/gems/railties-4.0.13/lib/rails/commands.rb:62:in `&lt;top (required)&gt;'
      from bin/rails:4:in `require'
      from bin/rails:4:in `&lt;main&gt;'
  </code></pre>
  
  <p><strong>This one works in the console --</strong></p>
  
  <pre><code>2.2.1 :037 &gt; app.purchase_order_copy_path(purchase_orders.first)
   =&gt; "/purchase_orders/1/copy"
  </code></pre>