> > Bob Hutchison wrote:
> >> Another dissenting voice... I will not/cannot avoid the use of the
> >> params object in some of my applications. So, please, no deprecation.
> >> I don't care if Merb supported controller parameters or not, in
> >> principle. I doubt I'd ever use them, I prefer to look at the params
> >> object as an input data thing that needs to be inspected rather
> >> carefully. On the other hand, Merb is still mostly light and easy to
> >> understand, and starts very quickly -- it would be sad to see this
> >> end.
> >
> > Bob, in what way are you using params? Why can't you avoid it? I think
> > you are not thinking about this correctly.
>
> Well, I'll give you an example. One of my applications is a course
> management system that administers and marks quizzes. The quiz is
> supplied as data to the program and the program generates the form.
> There is a single action in the controller that handles the test
> marking and updates the student's 'transcript'.

With action arguments one is still able to pass hash structures. For
example, if you have an unknown number of quiz questions, then perhaps
you would send

quiz_questions[sex]=radio(male,female)&quiz_questions[age]=intenger_select(0..50)

(I'm inventing some syntax for form creation here. :)

Then the action would look like

  def quiz_create(quiz_questions)
     ...
  end

The point is that you can pass hashes still in as arguments. Because
of this, there isn't anything you can't do with params that you cannot
do with action args.

ry
_______________________________________________
Merb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/merb-devel

Reply via email to