Say that I have two resources, Project and Task. A Project can have many Tasks; A Task belongs to one Project. Also say that I have Task nested under Project in routes.rb:
map.resources :projects do |project|
project.resources :tasks
end
Can one programmatically discover this relationship? Basically, I need to dynamically load an arbitrary object, then figure out if it has a "parent", and then load that parent.
Any ideas?