Creating custom URLs in Rails
===

I have 3 models. `Departments`, `Courses`, `Sections`.
All of them are heirachically connected with the proper `belongs_to` and `has_many` relations. A section belongs to a course which belongs to a department.

I would like to construct the site in such a way that the URL
`/view/department_name/course_name/section_name/` shows the section with the name `section_name`, which belongs to the course named `couse_name`, which belongs to the department `department_name`.

How can I do this? 

FYI: the different models are connected by their IDs in the database. Section has a course_id integer associated with it, and course has a department_id integer. Section also has a department_id, which is redundant, but that's how I have it set up.