Forum: Ruby on Rails confusing singleton resource

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Zhenning G. (Guest)
on 2009-02-07 16:52
I have a controller name homes, I would add the line
map.resource :home
so I like to return a url like
/home/1, /home/2......etc
but why I open up my browser
it appear the message like this:
No route matches "/home/1" with {:method=>:get}

so, what is wrong with me?
Billy H. (Guest)
on 2009-02-07 17:02
(Received via mailing list)
map.resource is for modelif you have a model named: home
then you must use:
map.resources :home
and generate a controller named: homes

On Sat, Feb 7, 2009 at 10:52 PM, Zhenning G. <
removed_email_address@domain.invalid> wrote:

> so, what is wrong with me?
> --
> Posted via
> >


CFC on Rails:

Only two surfaces of a box:
Zhenning G. (Guest)
on 2009-02-08 06:19
I addd these code into entries show view
<%= link_to 'ca', home_path(2) %>
<%= link_to "cc", entry_path(2) %>

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.to_sym

Extracted source (around line #1):

This topic is locked and can not be replied to.