I've got two objects (@stacks and @stories) with has_many relationships (through @anthologies). Stories can be viewed individually (/stories/1/) or as a collection in a Stack (/stacks/1/stories/1/).
map.resources :stories
map.resources :anthologies
map.resources :stacks, :has_many => :stories do |stack|
stack.resources :stories
end
I've got this basic frame working I'm trying to identify the when a story is being rendered as part of a stack so that I can build some navigation between stories. I figure the easiest way to do this is to check the URL for the primary controller, but 1) I don't know how to do this, and 2) it seems very un-Railsy, like there should be a more direct way.
Still getting my head around some of the basics of Rails here -- any recommendations on how to achieve the desired functionality?