Displaying 1 result from an estimated 1 matches for "expense_field".
Did you mean:
expense_fields
2012 Feb 26
0
how to get the index of the element passed to the render view ?
...e fom is displayed :
...
= simple_form_for(@project, :html => {:class => ''form-stacked'' })
do |f|
- unless @project.expenses.count > 0
No expenses
- else
#expenses
= f.fields_for :expenses do |f|
= render "backoffice/projects/expense_fields", :f => f
.clearfix
and the expense_fields partial is :
.row
= f.input :label, :wrapper => :nolabel, :input_html => { :class =>
"span3" }
I would like to test when the first expense item is displayed :
.row
- "if first expense.. test...