hey everyone, im working on my very first project using ruby on rails, and I have a question about the controllers im setting up. the website is pretty simple, there are a few sections, news, shows, bios, photos, links, those types of things. My question is: how is the best way to structure the controllers, should I have a public controller that handles all of those areas, since most of them are quick view and a detailed view, or should they each be individual controllers (ie: newsController, showsController, etc)?? if the best method is to have it all in one "public" controller, then how is my routes.rb setup to accomodate clean urls, so the "public" part is not displayed, http://urlhere/home, http://urlhere/shows and NOT http://urlhere/public/shows. keep in mind - public - would be the name of all the publically accessible actions/areas of the website, and is not to be confused with the public directory where the image/styles/javascripts are placed. Thanks for any advice someone can offer! --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
just use a map with options e.g.... # application routes map.with_options(:controller => ''application'') do |site| site.site_currency ''system/currency'', :action => ''change_currency'' site.site_login ''system/login'', :action => ''login'' end You can see my path is nothing like that controller name... hope that helps Tim -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Tim Perrett wrote:> just use a map with options e.g.... > > # application routes > map.with_options(:controller => ''application'') do |site| > site.site_currency ''system/currency'', :action => > ''change_currency'' > site.site_login ''system/login'', :action => > ''login'' > end > > You can see my path is nothing like that controller name... > > hope that helps > > Tim > > -- > Posted via http://www.ruby-forum.com/.okay thanks for the example, but what would your url look like? sorry - im still getting through the learning curve hah! --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---