def update
      @report = Report.find(params[:id])
  
      respond_to do |format|
        if @report.update_attributes(params[:report])
          format.html { redirect_to edit_category_report_path(@report.category, @report), notice: 'Report was successfully updated.' }
          format.json { head :no_content }
        else
          format.html { render action: "edit", :category_id => @report.category, :id => @report }
          format.json { render json: @report.errors, status: :unprocessable_entity }
        end
      end
    end
def update
      @report = Report.find(params[:id])
  
      respond_to do |format|
        if @report.update_attributes(params[:report])
          format.html { redirect_to edit_category_report_path(@report.category, @report), notice: 'Report was successfully updated.' }
          format.json { head :no_content }
        else
          format.html { render action: "edit", :category_id => @report.category, :id => @report }
          format.json { render json: @report.errors, status: :unprocessable_entity }
        end
      end
    end
PUT /reports/1
 PUT /reports/1.json