i am following the routing guides (2.6) on rails 3.According to it, i combined the 2 controller under namespace "admin" but couldn''t success to make it work.Before doing so everything was working at "localhost:3000/posts". I just made a new directory "admin" in /app/controller/admin and then added 2 controller name "posts_controller.rb" and "gne_controller.rb" inside it. but when i browsed to "localhost:3000/admin/posts" ,it gave error uninitialized constant ApplicationController please help to solve it and understand..:) thanks 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
show us the source of one controller at least there should be in app/controllers/admin/posts_controller.rb class Admin::PostController < ApplicationController end tom On Jun 20, 2011, at 18:41 , amritpal pathak wrote:> i am following the routing guides (2.6) on rails 3.According to it, i combined the 2 controller under namespace "admin" but couldn''t success to make it work.Before doing so everything was working at "localhost:3000/posts". > I just made a new directory "admin" in /app/controller/admin and then added 2 controller name "posts_controller.rb" and "gne_controller.rb" inside it. > but when i browsed to "localhost:3000/admin/posts" ,it gave error > > uninitialized constant ApplicationController > please help to solve it and understand..:) > thanks > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 <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 > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Jun 20, 2011 at 1:05 PM, Tom Meinlschmidt <tomas-ooGa/4BNRfTT2+6r9I86XQ@public.gmane.org>wrote:> 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 > > Thats what i am doing.Call you please tell me why error exists?? >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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 class Admin::PostsController < ApplicationController <- RIGHT and in your routes.rb (for rails3) have namespace :admin do resources :posts end tom On Jun 20, 2011, at 19:17 , amritpal pathak wrote:> > > On Mon, Jun 20, 2011 at 1:05 PM, Tom Meinlschmidt <tomas-ooGa/4BNRfTT2+6r9I86XQ@public.gmane.org> wrote: > 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 > > Thats what i am doing.Call you please tell me why error exists?? > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 uninitialized constant ApplicationController 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Amrit, Are you by any chance migrating this project from Rails 2.x to 3.x? If yes, you may have the application controller in old format. Can you check and verify if you have a file app/controllers/application_controller.rb? If you don''t have that, then you might have app/controllers/application.rb, in that case you will need to rename it to application_controller.rb Hope this helps -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/qndsXJiniWYJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 4:26 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Hi Amrit, > > Are you by any chance migrating this project from Rails 2.x to 3.x? > If yes, you may have the application controller in old format. > > Can you check and verify if you have a file > app/controllers/application_controller.rb? > If you don''t have that, then you might have app/controllers/application.rb, > in that case you will need to rename it to application_controller.rb > > sir this file was in app/controller/application_controller.rb before using > namespacing.Now i hadcopied it to app/view/admin along with > posts_controller.rb >i am unable to guess reason for error..:) thanks 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
That''s the problem. Don''t move application_controller.rb file It should always be under app/controllers folder not in the namespaced folder. Move it back and your error should go away On Tue, Jun 21, 2011 at 4:28 PM, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > > On Tue, Jun 21, 2011 at 4:26 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> Hi Amrit, >> >> Are you by any chance migrating this project from Rails 2.x to 3.x? >> If yes, you may have the application controller in old format. >> >> Can you check and verify if you have a file >> app/controllers/application_controller.rb? >> If you don''t have that, then you might have >> app/controllers/application.rb, in that case you will need to rename it to >> application_controller.rb >> >> sir this file was in app/controller/application_controller.rb before using >> namespacing.Now i hadcopied it to app/view/admin along with >> posts_controller.rb >> > > i am unable to guess reason for error..:) > > thanks > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 7:06 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> That''s the problem. Don''t move application_controller.rb file > It should always be under app/controllers folder not in the namespaced > folder. > Move it back and your error should go away > thanks sir .Thats error is solved but another one came w hen i browse to > "localhost:3000/admin/posts". >Template is missing Missing template admin/posts/index with {:handlers=>[:rhtml, :rxml, :erb, :builder, :rjs], :formats=>[:html], :locale=>[:en, :en]} in view paths "/home/amrit/check/app/views" The index.html.erb file exist already in /app/view/posts/index.html.erb. should i make a new directory in /app/views and move the "posts" directory inside it same as namespacing in controller?? Thank you very much for support. amritpalpatakgne.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Yes. Create a new directory "admin" under app/views and move "posts" directory into that one. On Tue, Jun 21, 2011 at 4:44 PM, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > > On Tue, Jun 21, 2011 at 7:06 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> That''s the problem. Don''t move application_controller.rb file >> It should always be under app/controllers folder not in the namespaced >> folder. >> Move it back and your error should go away >> thanks sir .Thats error is solved but another one came w hen i browse to >> "localhost:3000/admin/posts". >> > > > Template is missing > > Missing template admin/posts/index with {:handlers=>[:rhtml, :rxml, :erb, > :builder, :rjs], :formats=>[:html], :locale=>[:en, :en]} in view paths > "/home/amrit/check/app/views" > > The index.html.erb file exist already in /app/view/posts/index.html.erb. > > should i make a new directory in /app/views and move the "posts" directory > inside it same as namespacing in controller?? > > Thank you very much for support. > > amritpalpatakgne.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- Chirag http://sumeruonrails.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 7:21 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Yes. Create a new directory "admin" under app/views and move "posts" > directory into that one. > again bad luck.I did as you said. > new error >ActionController::RoutingError in Admin/posts#index Showing */home/amrit/check/app/views/admin/posts/index.html.erb* where line *#2* raised: No route matches {:controller=>"posts", :action=>"new"} I did everything as previous before namespacing ,it was working.The file new.html.erb exist in same directory.This file looks : <%= link_to ''New Post'', new_post_path%> <%= form_for(@post) do |f| %> <div class="field"> <%= f.label :name %><br /> <%= f.text_field :name %> </div> <div class="field"> <%= f.label :title %><br /> <%= f.text_field :title %> </div> <div class="field"> <%= f.label :content %><br /> <%= f.text_area :content %> </div> <div align="center"> <div class="actions"> <%= f.submit %> </div> </div> <div class="field"> <%= f.label :sign %><br /> <%= f.text_field :sign %> </div> <div class="field"> <%= f.label :value %><br /> <%= f.text_field :value %> </div> <% end %> <%= submit_tag "Test me!", :type => ''button'', :onclick => ''alert("It works!")'' %> <br> <%= submit_tag "Click me", :type => ''button'' %> <%= button_to "Great", :action => "click"%> <%= button_to "click me", :action => "work"%> here if i removed 1st time just to test ,the next line gives the error: No route matches {:controller=>"posts"} I think we are missing something to add or else. thanks 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
All your routes will need to change as per the named scope new_post_path should be changed to new_admin_post_path form_for(@post) should be changed to form_for [:admin, @post] and so on Check rake:routes for the full list of new routes with the namescope On Tue, Jun 21, 2011 at 5:08 PM, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > > On Tue, Jun 21, 2011 at 7:21 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> Yes. Create a new directory "admin" under app/views and move "posts" >> directory into that one. >> again bad luck.I did as you said. >> new error >> > > ActionController::RoutingError in Admin/posts#index > > Showing */home/amrit/check/app/views/admin/posts/index.html.erb* where > line *#2* raised: > > No route matches {:controller=>"posts", :action=>"new"} > > I did everything as previous before namespacing ,it was working.The file new.html.erb exist in same directory.This file looks : > > > <%= link_to ''New Post'', new_post_path%> > <%= form_for(@post) do |f| %> > > > <div class="field"> > <%= f.label :name %><br /> > <%= f.text_field :name %> > </div> > <div class="field"> > <%= f.label :title %><br /> > <%= f.text_field :title %> > </div> > <div class="field"> > <%= f.label :content %><br /> > <%= f.text_area :content %> > </div> > > <div align="center"> > > <div class="actions"> > <%= f.submit %> > </div> > </div> > <div class="field"> > <%= f.label :sign %><br /> > <%= f.text_field :sign %> > </div> > <div class="field"> > <%= f.label :value %><br /> > <%= f.text_field :value %> > > </div> > <% end %> > > <%= submit_tag "Test me!", :type => ''button'', :onclick => ''alert("It works!")'' %> > <br> > <%= submit_tag "Click me", :type => ''button'' %> > <%= button_to "Great", :action => "click"%> > <%= button_to "click me", :action => "work"%> > > > here if i removed 1st time just to test ,the next line gives the error: > > No route matches {:controller=>"posts"} > > I think we are missing something to add or else. > > thanks > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- Chirag http://sumeruonrails.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 7:55 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> All your routes will need to change as per the named scope > > new_post_path should be changed to new_admin_post_path > > form_for(@post) should be changed to form_for [:admin, @post] > > and so on > > thank you very much sir. >problem is solved. 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Last query.what should be the syntax to button''s part .It was <%= button_to "Great", :action => "click"%> So now it says No route matches {:controller=>"admin/posts", :action=>"click"} i tried to change it too as: <%= button_to "Great", :action => "admin_click"%> But didn''t work. amritpalpathkgne.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Glad to help :) On Tue, Jun 21, 2011 at 5:38 PM, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > > On Tue, Jun 21, 2011 at 7:55 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> All your routes will need to change as per the named scope >> >> new_post_path should be changed to new_admin_post_path >> >> form_for(@post) should be changed to form_for [:admin, @post] >> >> and so on >> >> thank you very much sir. >> > problem is solved. > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- Chirag http://sumeruonrails.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
In which controller do you have the "click" action defined? If it''s in the same controller, then you need to define it in your routes too. namespace :admin do resources :posts, :collection => {:click => :post} end And in the code you had posted, the click method in your controller was commented, so that may be the issue as well On Tue, Jun 21, 2011 at 5:46 PM, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > Last query.what should be the syntax to button''s part .It was > <%= button_to "Great", :action => "click"%> > So now it says > > No route matches {:controller=>"admin/posts", :action=>"click"} > i tried to change it too as: > <%= button_to "Great", :action => "admin_click"%> > > But didn''t work. > > amritpalpathkgne.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- Chirag http://sumeruonrails.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 8:27 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> In which controller do you have the "click" action defined? > If it''s in the same controller >yes it is in the same> then you need to define it in your routes too. > > namespace :admin do > resources :posts, :collection => {:click => :post} > end > Did exactly > And in the code you had posted, the click method in your controller was > commented, so that may be the issue as well >uncommented it. still no effect..:P 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Try this then <%= button_to "Great", click_admin_posts_path %> On Tue, Jun 21, 2011 at 6:13 PM, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > > On Tue, Jun 21, 2011 at 8:27 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> In which controller do you have the "click" action defined? >> If it''s in the same controller >> > yes it is in the same > >> then you need to define it in your routes too. >> >> namespace :admin do >> resources :posts, :collection => {:click => :post} >> end >> Did exactly >> And in the code you had posted, the click method in your controller was >> commented, so that may be the issue as well >> > uncommented it. > > still no effect..:P > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- Chirag http://sumeruonrails.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 8:52 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Try this then > no it haven''t work too. >undefined local variable or method `click_admin_posts_path'' for #<#<Class:0xb6675348>:0xb66732a0> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Can you paste the code from your routes file here? On Tue, Jun 21, 2011 at 6:26 PM, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > > On Tue, Jun 21, 2011 at 8:52 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> Try this then >> no it haven''t work too. >> > > undefined local variable or method `click_admin_posts_path'' for > #<#<Class:0xb6675348>:0xb66732a0> > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- Chirag http://sumeruonrails.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 9:09 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Can you paste the code from your routes file here? > > > Check::Application.routes.draw do > # get "gne/clg" > > get "posts/index" > #resources :posts, :module => "admin" > namespace "admin" do > resources :posts ,:collection =>{:click => :post} > end > #working right > #resources :posts do > #end > #working right > root :to => "posts#click" > root :to => "posts#work" > #get ''posts/click'' > #ActionController::Routing::Routes.draw do |map| > #map.root :controller => "posts", :action => "click" > #end > #ActionController::Routing::Routes.draw do |map| > #map.root :controller => "posts", :action => "work" > #end > end >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 21 June 2011 14:16, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Tue, Jun 21, 2011 at 9:09 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> >> Can you paste the code from your routes file here? >> >> Check::Application.routes.draw do >> # get "gne/clg" >> get "posts/index" >> #resources :posts, :module => "admin" >> namespace "admin" do >> resources :posts ,:collection =>{:click => :post} >> end >> #working right >> #resources :posts do >> #end >> #working right >> root :to => "posts#click" >> root :to => "posts#work"Can you explain what these two routes are doing? Colin>> #get ''posts/click'' >> #ActionController::Routing::Routes.draw do |map| >> #map.root :controller => "posts", :action => "click" >> #end >> #ActionController::Routing::Routes.draw do |map| >> #map.root :controller => "posts", :action => "work" >> #end >> end-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 9:21 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 21 June 2011 14:16, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > On Tue, Jun 21, 2011 at 9:09 AM, Chirag Singhal < > chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > >> > >> Can you paste the code from your routes file here? > >> > >> Check::Application.routes.draw do > >> # get "gne/clg" > >> get "posts/index" > >> #resources :posts, :module => "admin" > >> namespace "admin" do > >> resources :posts ,:collection =>{:click => :post} > >> end > >> #working right > >> #resources :posts do > >> #end > >> #working right > >> root :to => "posts#click" > >> root :to => "posts#work" > > Can you explain what these two routes are doing?These 2 routes were for "Great" and "click me" buttton before using namespacing. should the changes be in these 2 routes for namespacing rather than as: namespace "admin" do resources :posts ,:collection =>{:click => :post} end thanks 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Sorry, I sent you the rails 2.3 way of routing. It should have been like this: namespace "admin" do resources :posts do collection do post :click end end And as Colin said, you can''t have two "root" routes for your app. Keep one of them and remove the other one. On Tue, Jun 21, 2011 at 7:04 PM, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > > On Tue, Jun 21, 2011 at 9:21 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > >> On 21 June 2011 14:16, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > >> > >> > On Tue, Jun 21, 2011 at 9:09 AM, Chirag Singhal < >> chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> > wrote: >> >> >> >> Can you paste the code from your routes file here? >> >> >> >> Check::Application.routes.draw do >> >> # get "gne/clg" >> >> get "posts/index" >> >> #resources :posts, :module => "admin" >> >> namespace "admin" do >> >> resources :posts ,:collection =>{:click => :post} >> >> end >> >> #working right >> >> #resources :posts do >> >> #end >> >> #working right >> >> root :to => "posts#click" >> >> root :to => "posts#work" >> >> Can you explain what these two routes are doing? > > These 2 routes were for "Great" and "click me" buttton before using > namespacing. > > should the changes be in these 2 routes for namespacing rather than as: > > namespace "admin" do > resources :posts ,:collection =>{:click => :post} > end > > thanks > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- Chirag http://sumeruonrails.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Also, you may want to read up more on routing. Here''s a link to official guide, which does a great job of explaining how routing works in rails 3 http://guides.rubyonrails.org/routing.html On Tue, Jun 21, 2011 at 7:04 PM, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > > On Tue, Jun 21, 2011 at 9:21 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > >> On 21 June 2011 14:16, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > >> > >> > On Tue, Jun 21, 2011 at 9:09 AM, Chirag Singhal < >> chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> > wrote: >> >> >> >> Can you paste the code from your routes file here? >> >> >> >> Check::Application.routes.draw do >> >> # get "gne/clg" >> >> get "posts/index" >> >> #resources :posts, :module => "admin" >> >> namespace "admin" do >> >> resources :posts ,:collection =>{:click => :post} >> >> end >> >> #working right >> >> #resources :posts do >> >> #end >> >> #working right >> >> root :to => "posts#click" >> >> root :to => "posts#work" >> >> Can you explain what these two routes are doing? > > These 2 routes were for "Great" and "click me" buttton before using > namespacing. > > should the changes be in these 2 routes for namespacing rather than as: > > namespace "admin" do > resources :posts ,:collection =>{:click => :post} > end > > thanks > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- Chirag http://sumeruonrails.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 21 June 2011 14:44, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Also, you may want to read up more on routing. > Here''s a link to official guide, which does a great job of explaining how > routing works in rails 3 > http://guides.rubyonrails.org/routing.htmlI have lost track of how many times Aritpal Pathak has been advised to read that. Also you might like to try getting him to post the result of rake routes. Colin> > On Tue, Jun 21, 2011 at 7:04 PM, amritpal pathak <amritpalpathak1@gmail.com> > wrote: >> >> >> On Tue, Jun 21, 2011 at 9:21 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >>> >>> On 21 June 2011 14:16, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> > >>> > >>> > On Tue, Jun 21, 2011 at 9:09 AM, Chirag Singhal >>> > <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>> > wrote: >>> >> >>> >> Can you paste the code from your routes file here? >>> >> >>> >> Check::Application.routes.draw do >>> >> # get "gne/clg" >>> >> get "posts/index" >>> >> #resources :posts, :module => "admin" >>> >> namespace "admin" do >>> >> resources :posts ,:collection =>{:click => :post} >>> >> end >>> >> #working right >>> >> #resources :posts do >>> >> #end >>> >> #working right >>> >> root :to => "posts#click" >>> >> root :to => "posts#work" >>> >>> Can you explain what these two routes are doing? >> >> These 2 routes were for "Great" and "click me" buttton before >> using namespacing. >> should the changes be in these 2 routes for namespacing rather than as: >> namespace "admin" do >> resources :posts ,:collection =>{:click => :post} >> end >> thanks >> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > -- > Chirag > http://sumeruonrails.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 21 June 2011 14:59, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Also you might like to try getting him to post the result > of rake routes.ROFLMAO :-) -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 9:42 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Sorry, I sent you the rails 2.3 way of routing. > It should have been like this: > > namespace "admin" do > resources :posts do > collection do > post :click > end > end >Great!! working now.Thank you sir> > And as Colin said, you can''t have two "root" routes for your app. Keep one > of them and remove the other one. >ok> > > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 9:44 AM, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Also, you may want to read up more on routing. > Here''s a link to official guide, which does a great job of explaining how > routing works in rails 3 > http://guides.rubyonrails.org/routing.html > > > thats what i am following and i got this error from this tutorial.BTW > thanks again.......:P >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 9:59 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 21 June 2011 14:44, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Also, you may want to read up more on routing. > > Here''s a link to official guide, which does a great job of explaining how > > routing works in rails 3 > > http://guides.rubyonrails.org/routing.html > > I have lost track of how many times Aritpal Pathak has been advised to > read that. >Sir this time i am your advice and reading it .i got the error while following section number 2.6 on namespacing.Thats why i posted here and now got my answer.Now will move ahead on tutorial. Again thanks to all 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 21 June 2011 17:06, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Tue, Jun 21, 2011 at 9:59 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> >> On 21 June 2011 14:44, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > Also, you may want to read up more on routing. >> > Here''s a link to official guide, which does a great job of explaining >> > how >> > routing works in rails 3 >> > http://guides.rubyonrails.org/routing.html >> >> I have lost track of how many times Aritpal Pathak has been advised to >> read that. > > Sir this time i am your advice and reading it .i got the error while > following section number 2.6 on namespacing.Thats why i posted here and now > got my answer.Now will move ahead on tutorial. > Again thanks to allThat is good. You could try and help Joanne(Yennie) with her problems if you wished to make a contribution back to the Rails Community. Colin -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 12:18 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 21 June 2011 17:06, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > On Tue, Jun 21, 2011 at 9:59 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> > wrote: > >> > >> On 21 June 2011 14:44, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > Also, you may want to read up more on routing. > >> > Here''s a link to official guide, which does a great job of explaining > >> > how > >> > routing works in rails 3 > >> > http://guides.rubyonrails.org/routing.html > >> > >> I have lost track of how many times Aritpal Pathak has been advised to > >> read that. > > > > Sir this time i am your advice and reading it .i got the error while > > following section number 2.6 on namespacing.Thats why i posted here and > now > > got my answer.Now will move ahead on tutorial. > > Again thanks to all > > That is good.Thank you sir.i could be motivated just because of you otherwise i was going to quit RoR.> You could try and help Joanne(Yennie) with her problems > if you wished to make a contribution back to the Rails Community. >Why not!! is there any mail from her side? amritpalpathkgne.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 21 June 2011 17:22, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Tue, Jun 21, 2011 at 12:18 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> >> On 21 June 2011 17:06, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > >> > >> > On Tue, Jun 21, 2011 at 9:59 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> >> > wrote: >> >> >> >> On 21 June 2011 14:44, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> > Also, you may want to read up more on routing. >> >> > Here''s a link to official guide, which does a great job of explaining >> >> > how >> >> > routing works in rails 3 >> >> > http://guides.rubyonrails.org/routing.html >> >> >> >> I have lost track of how many times Aritpal Pathak has been advised to >> >> read that. >> > >> > Sir this time i am your advice and reading it .i got the error while >> > following section number 2.6 on namespacing.Thats why i posted here and >> > now >> > got my answer.Now will move ahead on tutorial. >> > Again thanks to all >> >> That is good. > > Thank you sir.i could be motivated just because of you otherwise i was > going to quit RoR. >> >> You could try and help Joanne(Yennie) with her problems >> if you wished to make a contribution back to the Rails Community. > > Why not!! > is there any mail from her side?Have you not seen her postings? One of the best ways to learn about a subject is to read all the threads on the forum and for any questions where you understand the question then make sure you understand the answers. In no time you will find yourself answering questions. Her thread subject is "Error of undefined method". Colin -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jun 21, 2011 at 12:35 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 21 June 2011 17:22, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > On Tue, Jun 21, 2011 at 12:18 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> > wrote: > >> > >> On 21 June 2011 17:06, amritpal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > >> > > >> > > >> > On Tue, Jun 21, 2011 at 9:59 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> > >> > wrote: > >> >> > >> >> On 21 June 2011 14:44, Chirag Singhal <chirag.singhal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > >> >> > Also, you may want to read up more on routing. > >> >> > Here''s a link to official guide, which does a great job of > explaining > >> >> > how > >> >> > routing works in rails 3 > >> >> > http://guides.rubyonrails.org/routing.html > >> >> > >> >> I have lost track of how many times Aritpal Pathak has been advised > to > >> >> read that. > >> > > >> > Sir this time i am your advice and reading it .i got the error > while > >> > following section number 2.6 on namespacing.Thats why i posted here > and > >> > now > >> > got my answer.Now will move ahead on tutorial. > >> > Again thanks to all > >> > >> That is good. > > > > Thank you sir.i could be motivated just because of you otherwise i > was > > going to quit RoR. > >> > >> You could try and help Joanne(Yennie) with her problems > >> if you wished to make a contribution back to the Rails Community. > > > > Why not!! > > is there any mail from her side? > > Have you not seen her postings? One of the best ways to learn about a > subject is to read all the threads on the forumok will follow it.> and for any questions > where you understand the question then make sure you understand the > answers. In no time you will find yourself answering questions. Her > thread subject is "Error of undefined method". > ok >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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.