Ruby on Rails Wednesday, June 6, 2012

I have the usual:

config/routes.rb:
NewApp::Application.routes.draw do
match('blahs/:item' => 'blahs#show', :constraints => { :item =>
/.*/ })
end

app/view/blahs/show.html.erb:
<%= link_to "blah", blahs_path(9999) %>

But I'm getting this error:
undefined method `blahs_path' for
#<#<Class:0x007f96083474c0>:0x007f960509b288>

I've tried blah_path, blahs_path, blah_url, and blahs_url.

What am I doing wrong?

I'm using Rails 3.2. This is my first Rails 3.2 app but I've used Rails
2.x for a long time. I can't figure out what I'm doing wrong.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment