views:

17

answers:

1

I am getting a routing error: No route matches "/deccom_tasks/update/1" with {:method=>:put}

I'm not sure why I am getting a routing error for a route that usually works.

Route:

 map.resources :decom_tasks, :collection => {:sort => :post, :deactivate_task => :get,  :reactivate_task => :get}

Controller:

 def update
    @task = Task.find(params[:id])

    respond_to do |format|
      if @task.update_attributes(params[:task])
        format.html { redirect_to(@task, :notice => 'Task was successfully updated.') }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @task.errors, :status => :unprocessable_entity }
      end
    end
  end
A: 

Mark Thomas was right, syntax error

inKit