def update
      @template = Template.find(params[:id])
      if @template.update(template_params)
        head :no_content
      else