Skip to content
jorahood edited this page Sep 12, 2010 · 8 revisions
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>
Clone this wiki locally