sure.. when you want to use namespace, having two options 1. "pseudo" namespace from routes
in routes.rb map '/namespace/:controller/:action/:id' and then you'll have all the controllers in /app/controllers w/o any namespace in class name 2. namespaced in source this one follows my previous example, eg /app/controllers/namespace/cars_controller.rb class Namespace::CarsController < ApplicationController end tom On Jun 20, 2011, at 18:54 , amritpal pathak wrote: > > > On Mon, Jun 20, 2011 at 12:48 PM, Tom Meinlschmidt <[email protected]> > 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 > > -- > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. -- =============================================================================== Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz =============================================================================== -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

