From: James Edward Gray II Date: 2005-09-27T08:30:23+09:00 Subject: Re: Embedded Ruby and Tag Libs On Sep 26, 2005, at 5:56 PM, Adam Van Den Hoven wrote: > James, > > I agree, except that it starts to fall apart as you get more complex. > > Lets take an example from rails that REALLY annoys me: form_tag. It > follows largely the same form you suggest. > > Right now to make a form in rails you do the following: > > <%= form_tag :controller=>"foo" :action=>"bar" %> > Name: > <%= text_field "person", "name", "size" => 20 %> > Password: > <%= password_field "person", "password", "maxsize" => 20 %> > Single?: > <%= check_box "person", "single" %> > Description: > <%= text_area "person", "description", "cols" => 20 %> > > <%= end_form_tag %> > > There's no easy way to encapsulate this into a single method, > although Devin (as I'm writting this) has some good suggestions. Would you mind showing how you would clean this up with an XML syntax? I personally find XML very wordy. James Edward Gray II