REST and custom routes

So here's what I do and lets see if someone can solve the problems

rails test cd test script/generate scaffold Task body:string completed:boolean rake db:create rake db:migrate

#routes.rb map.resources :tasks, :member => {:complete => :post} map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format'

#tasks_controller.rb def complete   @task = Task.find(params[:id])   @task.completed = true end

#index.html.erb <td><%=h task.body %></td> <td><%=h task.completed %></td> <td><%= link_to 'Show', task %></td> <td><%= link_to 'Edit', edit_task_path(task) %></td> <td><%= link_to 'Destroy', task, :confirm => 'Are you sure?', :method => :delete %></td> <td><%= link_to 'Complete', complete_task_path(task) %></td>

script/server

Now, add a task then go back to index Click the Complete link and watch it go:

Unknown action No action responded to 1

And here's what it's doing in the log: Parameters: {"action"=>"1", "id"=>"complete", "controller"=>"tasks"}

Why isn't it recognizing it as action => complete, id => 1 ?

I can reproduce this every time so there's nothing I'm doing that might trigger something like this.