Forum: Ruby on Rails Dynamic forms

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
De R. (Guest)
on 2005-11-30 02:25
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....
This topic is locked and can not be replied to.