I'm just completely stuck on this...I'm sure their is a slick way of doing things but I just can't seem to find a solution..even through a google!!!

In advance, thanks for replies!

Problem:
Assume I have a table called people, people_skills, and skills.

class Person < ActiveRecord::Base
has_many : people_skill

has_many :skills, :through => : people_skill
end

class PeopleSkill < ActiveRecord::Base
belongs_to : person
belongs_to :skill
end

class Skill < ActiveRecord::Base
has_many : people_skills
has_many : people, :through => : people_skills
end

The above code works and I can save Skill rows from Person object.
Example
skill = Skill.new
skill.name = "watching tv"
person = Person.find(1)
person.skills << skill
person.save

Again, the above code works.

Here is where I'm having trouble. When I use
<&#37;= link_to 'New skill', new_skill_path %>
Obviously, it's going to a page where I can create skill but I want to associate that to person. I've tried this
<%= link_to 'New skill', new_skill_path(person) %> but no go. Thanks for helping RoR noob.


<% for person in @people %>
<table border="2" width="100%">
<tr >
<td align="left"><b>Personal Name</b>: <%=h person.name %><br/>
<b>Personal Info</b>: <%=h person.info %></td>
<td align="right">
<%= link_to 'Delete This Person', person, :confirm => 'Are you sure?', :method => :delete %><br/>
<a href="#">Upload Resume</a>
</td>
</tr>

<tr>
<td>

<% for skill in person.skills %>
<%=h skill.name %>
<br />
<% end %>
<%= link_to 'New skill', new_skill_path %>
</td>
<td>

</td>
</tr>
</table>
<p />
<% end %>