Rails routing: how to mix "GET" and "PUT"

Posted by thermans on Stack Overflow See other posts from Stack Overflow or by thermans
Published on 2010-05-26T14:40:56Z Indexed on 2010/05/26 18:21 UTC
Read the original article Hit count: 200

Filed under:
|

Not sure how to frame this question (I'm still wrapping my head around Rails).

Let's try this:

Say I wanted to implement the user side of Ryan Bates' excellent railscast on nested models. (He shows how to implement a survey where you can add and remove questions and answers dynamically). I want the user's side of this: to be able to answer questions and, not in the tutorial, be able to add comments.

It seems to me that you have to implement a view that shows the questions and answers, allow selection of the answers, and the input of comments. So there would need to be a way to show the information, but also update the model on input, right?

I know I'm not explaining this very well. I hope you understand what I'm getting at.

Is it just a question of setting up the right routes? Or is there some controller mojo that needs to happen?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby