Re: uninitialized constant ApplicationController

amritpal pathak
2011-06-20T16:54:16Z

On Mon, Jun 20, 2011 at 12:48 PM, Tom Meinlschmidt
<tomas-ooGa/4BNRfTT2+6r9I86XQ@public.gmane.org>wrote:

> show us the source of one controller at least
> ya sure.
> there should be in app/controllers/admin/posts_controller.rb
>
   it is as follow and it was working without using namespace i.e when it
was in /app/controller.
    it is posts_controller.rb..:P


> class PostsController < ApplicationController
>
> #def click
>
> #end
>
> def new
>
> end
>
> def show
>
>   @show = Post.find(params[:id])
>
>   end
>
>   def index
>
>   @post = Post.new
>
>   end
>
>  def create
>
>   @post = Post.new(params[:post])
>
>   respond_to do |format|
>
>   if @post.save
>
>   format.html{ redirect_to(@post, :notice => ''Post   was
successfully
>> created.'') }
>
> end
>
> end
>
>         end

>  end
>
>
>     amritpalpathakgne.wordpress.com