New to Rails. Looking for some help

I have been working with Ruby on Rails for about a week.

I am trying to figure out a problem.

I have a small relational database.

resources :client do
  resources :department do
    resources :task

What I want is to be able to add tasks while looking a specific "show"
of a department.


<h1> Department: </h1>
<%= render @department %>
<h2> Tasks: </h2>
<%= render @department.tasks %>
<h2> Add a Task: </h2>

now I am likely to want to move this off as a partial under the /tasks
but at a basic level how do I create this form?

In order to do this I know I have to define the create method in my
tasks controller and then create a <%= form_for .... %> I am just
struggling with this.

Please help!


Hi John,

Bill -

Thanks so much for your response. I spent a good portion of yesterday on
google trying to solve this. I was dancing around the solution. I
appreciate your help.

Hi John,