Celso eu não sei como faço para colocar no diretório que você disse,
então vou colocar aqui para ver se ajuda. Valeu !!
<div class="q-form-container1">
<!--Fim da primeira parte do formulário-->
<!--Início da segunda parte do formulário-->
<%= form_tag("/timesheets/approve_all") %>
<div class="block-left">
<div class="q-form-header1">
<h4>Lista de Timesheets Pendentes: </h4>
</div>
<div id="consultinfowork" class="q-form-section1">
<div class="field1 tablespace1">
<table width="800" cellspacing="0" cellpadding="0"
border="0" class="list tablespace">
<thead>
<br><br>
<tr>
<th>Projeto</th>
<th>Semana/Início/Término</th>
<th>Colaborador</th>
<th>Esforço (%)</th>
<th>Atividades</th>
<th>Comentário</th>
<th colspan=2><center>Opções</center></th>
</tr>
</thead>
<tbody>
<%= form_tag 'display' %>
<% @timesheets.each do |timesheet| %>
<%= form_for timesheet, :url => {:action
=> :approve_no, :id =>
timesheet.id} do |time| %>
<div class="field1">
<tr>
<td><%=
timesheet.project.name%></td>
<td><%= timesheet.week.semanaAno %></td>
<td><%=
timesheet.user.name %></td>
<td><%= timesheet.effort %></td>
<td><%= timesheet.activities %></td>
<td>
<%=
collection_select(:timesheet,:review_manager,
Comment.find(:all, :conditions => ["status = 'Ativo'"], :order =>
"description"), :description, :description, {:prompt => true}) %>
</td>
<td><%= time.submit "Reprovar" %> </td>
<td><%= link_to "Aprovar", {:action
=> :approve_yes, :timesheet_id =>
timesheet.id} %> </td>
</tr>
</div>
<% end %>
<% end %>
</div>
</tbody>
</table>
<%= link_to "Aprovar Todos", :action => :approve_all %>
</div>
</div>
</div>
</div>
</div>
Abraços a todos
On Apr 27, 10:51 am, Bruno Arueira <
bgnarue...@gmail.com> wrote:
> Felipe,
>
> Pelo que entendi é quase como um nested resources...
>
> Ou seja haveria um form_tag e qualquer objeto associado deve ser utilizado
> um fields_for, porém como o Celso falou sem código fica difícil opinar :)
>
> Att,
>
> Em 27 de abril de 2012 10:27, Celso Dantas <
celsodan...@gmail.com> escreveu:
>
>
>
>
>
>
>
>
>
> > joga o código (ou parte dele) no gist/pastebin pra facilitar compreensão.
>
> > 2012/4/27 FelipeAlmeida <
felipe.alm.si...@gmail.com>
> >> Visite o grupo emhttp://
groups.google.com/group/rails-br?hl=pt-BR
> > Visite o grupo emhttp://
groups.google.com/group/rails-br?hl=pt-BR