From: Adam Van Den Hoven Date: 2005-09-27T07:56:43+09:00 Subject: Re: Embedded Ruby and Tag Libs 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. On 26-Sep-05, at 2:49 PM, James Edward Gray II wrote: > On Sep 26, 2005, at 4:25 PM, Adam Van Den Hoven wrote: > > >> I tend to build a site once then provide a style guide and show >> them how to update their content. There is no way I'm going to be >> able to document for my client the mechanic how to create a table >> on some arbitrary page using the code you have below. >> > > I bet you could use ERb and some helper methods to great affect for > something like this. > > >> Its a lot simpler, IMHO, if I just told them to write the following: >> >> >> Fishermen at the Steveston >> docs, circa 1843 >>

Yadda yadda yadda.

Blah blah blah

> x:caption> >> >>
>> >> I can then write my markup from that. >> > > An example of what I'm thinking: > > <%= photo :imgref => "someurl", > :title => "Fishermen at the...", > :caption => "

Yadda yadda yadda...", > :photographer => "James Tyson", > :publication => "Steveston Chronicle", > :year => 1983 %> > > That's trivial to implement as a simple Ruby method call where you > will have the full language at your command to build up whatever > return value you need. > > Just a thought. > > James Edward Gray II > > >