On Sunday 09 April 2006 00:30, Bas wrote:
Thanks for the reply Wiebe,
I’m able to create a form with all the objects from the Array/Hash
having their own input with your construction, but there is no update
when I accept the changes in my form.
So I’m still looking for way to make this work.
When using my technique, you of course have to take care of updating
entry in the hash yourself.
In your update and/or create method (or create a method which contains
code between create and update), so something like
hash.each_key |id| do
object = Object.find(id)
object.name = hash_name[id]
This is only an example, but it gives an idea.
If anybody knows a way of automating this kind of mass-editing and
all ears, but to my knowlege, that doesn’t exist. The text_field method
example, only takes the arguments useful for editing one object at a
There is no text_fields_from_hash(collection, key, value) or whatever.