Re: path helper help

Everaldo Gomes
Thu, 20 Sep 2012 01:54:28 -0000

Maybe it could be a inflection problem:

"home".pluralize
"homes"

The convention is that a controller is the pluralized name of the model.

On Wed, Sep 19, 2012 at 10:32 PM, S Ahmed
<sahmed1020-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> I have a controller:
>
> class HomeController < ApplicationController
>   def index
>
>   end
>
>   def about
>   end
>
>   def contact
>   end
>
>   def terms
>   end
>
>   def privacy
>   end
> end
>
> My routes.rb has:
>
>  resources :home do
>     member do
>       get ''about''
>       get ''contact''
>       get ''terms''
>       get ''privacy''
>     end
>   end
>
>
> In my application.html.erb I have:
>
> <a href="<%= about_home_path
%>">About
>
> It seems to be expecting an id?
>
> I''m getting the error:
>
>
> No route matches {:action=>"about",
:controller=>"home"}
>
>
> Rake routes shows:
>
> about_home GET    /home/:id/about(.:format)   home#about