RESTful dynamic select tags

Hi there,

i have a RESTful (hope so… it’s my first one :slight_smile: ) app with a project
model and a project controller.
There is also a model timeblock which represents a specific amount of
time a user spends working in a project for a specific task.
I devide into projects and sub_projects, these are the same project-
model but sub projects have a project_id other than 0 (i know the fact
it’s called project_id is a bit confusing…)

Timeblock is a nested resource of a user.
To create a new timeblock i call the url /user/5/timeblocks/new and
get a form with 2 selectboxes.

the first selectbox displays every project (project_id == 0).
i wan’t my app to dynamicly fill the second selectbox with the
subprojects of the selected project.

workflow should look like this:
user selects project with id 5 on selectbox1 => selectbox2 shows only
the subprojects of the selected project (project_id == 5)

i thought about a custom route like “/projects/5/
show_subproject_optionlist” which returns the -tags for the
subprojects so i can perform an ajax call onUpdate of selectbox1 on it
and update selectbox2 but this doesn’t neither feel “Rails’ish” nor
“Rest’ish” to me.

can you give ma some hints on how to solve my problem in a nice and
clean way?

Thanks in advance,