Topic: Partials question
I'm very new to Ruby on Rails.
Right now I have a list of names stored in a DB and each list has_many associations. Each name is associated with a user.
I want to be able to display each name and have the user be able to click "expand" to see a bulleted list of associations (and hopefully click it again to go away, and click an "expand all" button to see everything). Right now I'm just looping through both lists and displaying them like this
What I thought I might be able to do was to link to a partial (or even link back to the page itself, and pass a parameter of the name ID. If the name ID matches the current name being displayed, then it would list the associations below.
But I can't see how to pass parameters with link_to.
Also, if anybody has any other suggestions on how to do this, I'd like to know.