[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Dynamically adding rows in rails application

dtblankenship

5/15/2007 9:04:00 PM

Hello all.

I am pretty new to ruby on rails, so please bare with me. I have been
reading Agile Web Development with Rails and have now decided to
attempt to create my own application to help me learn rails a bit
better.

I have a form for user information (name, address, etc.). A user can
have many courses associated with them. The problem is that all of
the data needs to be inserted as a transaction at once, and the number
of courses can vary. I have a form that points to create for the user
data, but within that form, I need to be able to add a new course line
to their form. I'd like to get this working without AJAX first to
make sure I can understand it, but whenever I do a post, it goes to
create instead of to my 'add_course'. When I create a posted link_to,
it does not pass the data through for reposting.

My question is: how can I have a link within a form tag pass the post
data along to a new function, and then show this data back on the form
after adding another course?

Thank you so much,
Dave