Dynamic forms


#1

All,

if I have an object defined as follows:

class Fred
attr_accessor :fields

  def initialize
     @fields = Hash.new
  end

end

If want to display the keys in Fred map in a form thus doing
something
like

<%= text_field( ‘myFred’, ‘(?? WHAT DOES THIS LOOK LIKE ??)’ ) %>

The issue is what does the databinding expression look like and can’t
this
be achieve with Rails ?
For instance if the hash contains a key ‘name’ that is the field I
want to
interact with on the form. This would be the equiv of struts
dynaforms…

Any ideas ? Rails gods and goddesses, Please help…