Hi,

I'm with the following code in html + javascript in my ruby application:


    <script type="text/javascript">
      $(document).ready(function(){
        $('#numero_tarefas').change(function(){
          $('#tarefas').html('');
          for (var tarefa = 0; tarefa < $(this).val(); tarefa++) {
            $('#tarefas').append('Nome da tarefa ' + (tarefa + 1) + ': '
+ '<input type="text" id="tarefas['+ tarefa +'][input]" name="tarefas['+
tarefa +'][input]" />&nbsp;');

            // copiando as opcoes das sub-tarefas modificando o id
            $('[name=subtarefas-options] select').attr('id', tarefa);
            $('#tarefas').append('Nmero de subtarefas:'
+$('[name=subtarefas-options]').html() + '<br /><div
name="div-subtarefas" id="div-subtarefas"></div><br />');

            // criacao dos inputs das subtarefas
            $('[name=options_subtarefas]').change(function(){
            // recuperar a primeira div
              var first_subtarefa = $('#' + this.id + ' ~
[name=div-subtarefas]').first();
              first_subtarefa.html('');
              for (var sub_tarefa_id = 0; sub_tarefa_id < $(this).val();
sub_tarefa_id++) {
                var t = parseInt(this.id) + 1;
                first_subtarefa.append('&nbsp;&nbsp;&nbsp;&nbsp;Nome da
subtarefa '+ (sub_tarefa_id+1) + ' para a tarefa ' + (t) +
                ': ' +
                <%#*'<input type="text" id="tarefas[' + this.id +
'][sub][' + sub_tarefa_id + ']" name="tarefas[' + this.id + '][sub][' +sub_tarefa_id + ']" /><br />');%>
                '<input type="text" id="tarefas[' + this.id + '][sub]['
+ sub_tarefa_id + ']" name="tarefas[' + this.id + '][sub][' +
sub_tarefa_id + ']" /><br />');
              }
            });
          }
        });
      });
    </script>

How can I take the array witch name is tarefas['+ tarefa +'][input] in
my controller using params?