small medium large xlarge

04 Mar 2008, 17:18
Justin Case (3 posts)

Hi there,

How would I go and add validation to the “Multi-step wizard” recipe? I can not seem to get any form of validation working in any of the models. A simple “validate_length_of” for the short_answer questions is what I have in mind.

Can someone kick me in the right direction? Cheers. :)

Edit; I seem to make to much noise before looking. Think I got something going. Will let you know

23 Oct 2008, 20:08
Daniel Bozeman (6 posts)

I’m curious as to how you went about implementing this

02 Jun 2009, 10:02
Serguei Cambour (14 posts)

The example given in the book is not complete! That is why: 1. In the QuizzesController there is no ‘new’ action. We can see it in the generating script but not in the downloaded file. Strange…So it’s not explained what the ‘new’ action does in the code. 2. Why there is no map.resources :questions in routes.rb. Normally when you generate a scaffold (what I did for questions, answers and quizzes) all the routes are generated automatically. 3. When you come to the last ‘state’ of the quiz, you stay blocked with these 2 buttons - ‘next’ and ‘previous’, and there is no way to end up with the quiz and to come back the list of quizzes.

Resuming all that, I can tell that I hate tutorials that are speed-made with an option “what is not clear - guess it your self”).:(

You must be logged in to comment