public
Description: The web app builder for Rails
Home | Edit | New

field-list

Attribute Description Default Value Example
tag   scope.in_form ? “input” : “view”  
Parameter Tag Description Default Content
[fieldname]-label <item-label>   <label>
label <do>   <%= this_field.to_s.titleize %>
[fieldname]-view <item-value>   <view>
view <do>   <[fieldname]-tag>
[fieldname]-tag <call-tag>    

<field-list> tag defined in rapid.dryml


<def tag="field-list" attrs="tag"> <% tag ||= scope.in_form ? "input" : "view" %> <labelled-item-list merge-attrs="&attributes - attrs_for(:with_fields)"> <with-fields merge-attrs="&attributes & attrs_for(:with_fields)"> <labelled-item unless="&tag == 'input' && !can_edit?"> <item-label param="#{this_field.to_s.sub('?', '')}-label"> <do param="label"><%= this_field.to_s.titleize %></do>


Last edited by jorahood, Wed Oct 22 13:37:37 -0700 2008
Home | Edit | New
Versions: