Re: uninitialized constant ApplicationController

amritpal pathak
2011-06-21T04:30:08Z

On Mon, Jun 20, 2011 at 10:06 PM, amritpal pathak
<amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> wrote:

>
>
> On Mon, Jun 20, 2011 at 1:23 PM, Tom Meinlschmidt
<tomas-ooGa/4BNRfTT2+6r9I86XQ@public.gmane.org>wrote:
>
>> I said...
>>
>> if you have posts_controller in
/app/controllers/admin/posts_controller.rb
>>
>> then you MUST have this namespace in your class name
>>
>> class PostsController < ApplicationController <- WRONG
>>
>      ok
>
>>
>> class Admin::PostsController < ApplicationController <- RIGHT
>>   done..:)
>>
>> and in your routes.rb (for rails3) have
>>
>> namespace :admin do
>>        resources :posts
>> end
>>
>       done.....:)
>          still "localhost:3000/admin/posts" gives the error
>          Routing Error
>
>
           awaiting   your reply sir
     thanks