From: Shaun Fanning Date: 2005-07-21T04:08:48+09:00 Subject: Re: Variable class (newb question) On 7/20/05 12:33 PM, "David A. Black" wrote: > > Another possibility (but I'd have to see more of how your data is > being passed around to know) might be some kind of serialization that > ended up with an array of objects that knew their own class, and knew > how to store themselves -- resulting in something like: > > questions = > questions.each {|q| q.store_response } > > which is, as they say, "more OO". > > > David Basically since the data is coming from an HTTP form post, I am able to name the elements such that PHP will send it all back as a bunch of associative arrays and each storeResponse method knows how to parse those arrays and how to put the responses into the database. I need to study Rails more to see how complex POST responses are typically sent back and parsed since I will be using it soon, but I wanted to think through this design problem down at the Ruby level because I am trying to learn how to "think" in Ruby first. Thank you for all the feedback. I have learned a great deal about Ruby just through this little thread. Shaun