I''ve added a controller ''blog/admin''. When I want to access ''blog/admin/index'' it says that the page doesn''t exist. It works in my local environment. What am I missing? -- Posted via http://www.ruby-forum.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 Sat, 2010-02-06 at 13:26 +0100, Pål Bergström wrote:> I''ve added a controller ''blog/admin''. When I want to access > ''blog/admin/index'' it says that the page doesn''t exist. It works in my > local environment. What am I missing?---- conventionally, most people would have... app /controllers /helpers /models /views and then maybe inside... app /controllers /admin /blog_controller.rb and this blog_controller.rb would look like... class Admin::BlogController < ApplicationController but since you don''t actually give us paths or the actual error, it''s hard to say what you are missing but you could probably fix anything in routes.rb if you really want to. when you say that you''ve added blog/admin, the route and mechanics are unclear. Craig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- 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.
Craig White wrote:> On Sat, 2010-02-06 at 13:26 +0100, P�l Bergstr�m wrote:> when you say that you''ve added blog/admin, the route and mechanics are > unclear.You''re right. A better way is to add a /controller/admin/blog_controller.rb. I think I''ll do that instead. More in line with what I''ve done before. Thanks. I tried /controller/blog/admin/. It works locally. I thought my information was rather clear and hoped someone would say "aha, you''re missing ...". I don''t understand why it works locally but not on the remote server? -- Posted via http://www.ruby-forum.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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Pål Bergström wrote:> Craig White wrote: >> On Sat, 2010-02-06 at 13:26 +0100, P�l Bergstr�m wrote: > >> when you say that you''ve added blog/admin, the route and mechanics are >> unclear. > > You''re right. A better way is to add a > /controller/admin/blog_controller.rb. I think I''ll do that instead. More > in line with what I''ve done before. Thanks.You missed Craig''s point. There''s nothing wrong with the name of your controller; rather, Craig said (and I agree) that you didn''t provide enough information for us to help. Output from rake routes might be helpful.> > I tried /controller/blog/admin/. It works locally. I thought my > information was rather clear and hoped someone would say "aha, you''re > missing ...". I don''t understand why it works locally but not on the > remote server?Are your routes files different? Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> and this blog_controller.rb would look like... > class Admin::BlogController < ApplicationController >What about the route and map.resources? -- Posted via http://www.ruby-forum.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.