I have a couple of questions. I’m learning Ruby at the same time as
Rails, so please forgive me if this is trivial.
But when I get non-model related params back from the form, is there a
quick and easy way to extract those into local varialbes? i.e. if
params has keys fname and lname, to have them extracted into local
variables called fname and lname without resorting to:
fname = params[‘fname’]
lname = params[‘lname’]
Also, my perception is that when it comes to non-model fields, I’m
pretty much on my own. In Turbogears, I can define a validation schema,
complete with a rich set of predefined validators, and then the schema
gets automatically called when the form is submitted. With Rails, it
looks like I need to write up my own validation code from scratch.
AWDWR seems to confirm that. Am I on the mark? I was expecting a
little more Rails Magic in this area.