I am creating a storyy Ruby on Rails application. Each story has several pages.
How to configure route.rb so that I have the following URLs:
http://mysite.com/[story id]/[page id]
how
http:
I am currently using this setting:
http://mysite.com/stories/29/pages/46
Using:
ActionController::Routing::Routes.draw do |map| map.resources :stories, :has_many => :pages map.resources :pages map.root :controller => "stories", :action => "index" map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end
Thanks in advance. I'm new to Rails and routing seems a bit trickier for me right now.
source share