title: .clear() method giving Uncaught ReferenceError: company is not defined
body: <p>Ok so I am trying to save a client form to server. I am using boostrap modal to store the form and underscore template to get the for from backbone. After the form is submited its all good and well the form goes to backend and is saved in the database. The problem I'm having is that after I saved the client and want to input new info for another client it send a PUT method witch i solved by using "@model.clear()". Now every thing still works but I'm getting a "Uncaught ReferenceError: company is not defined" error in the console. and i know it is because of the ".clear()" though i have no idea how to fix it.</p>
  
  <pre><code>class Info.View.Client extends Backbone.View
   el: '.saveClient'
  
   events:
    'click .save': 'saveClient'
    'click .onClose': 'alertRemove'
  
   initialize: ()-&gt;
      Backbone.Validation.bind( @,
      {
      valid: (view, attr)-&gt;
        $('.company').removeClass('has-error')
        $('.address').removeClass('has-error')
        $('.city').removeClass('has-error')
        $('.companyId').removeClass('has-error')
        $('.email').removeClass('has-error')
  
      invalid: (view, attr, error)-&gt;
        if attr == 'company'
          $('.company').addClass('has-error')
          $('.txt').text('Nevivestai duomenys!')
          $('.alert').removeClass('alert-success')
          $('.alert').removeClass('alert-warning')
          $('.alert').addClass('alert-danger').show()
        if attr == 'city'
          $('.city').addClass('has-error')
          $('.txt').text('Nevivestai duomenys!')
          $('.alert').removeClass('alert-success')
          $('.alert').removeClass('alert-warning')
          $('.alert').addClass('alert-danger').show()
        if attr == 'address'
          $('.address').addClass('has-error')
          $('.txt').text('Nevivestai duomenys!')
          $('.alert').removeClass('alert-success')
          $('.alert').removeClass('alert-warning')
          $('.alert').addClass('alert-danger').show()
        if attr == 'companyId'
          $('.companyId').addClass('has-error')
          $('.txt').text('Nevivestai duomenys!')
          $('.alert').removeClass('alert-success')
          $('.alert').removeClass('alert-warning')
          $('.alert').addClass('alert-danger').show()
        if attr == 'email'
          $('.email').addClass('has-error')
          $('.txt').text('Blogas elektroninis pašto adresas!')
          $('.alert').removeClass('alert-success')
          $('.alert').removeClass('alert-warning')
          $('.alert').addClass('alert-danger').show()
       }
     )
  
    saveClient: -&gt;
     @model.save(
      {
       company   : $('.company').val()
       country   : $('.country').val()
       city      : $('.city').val()
       address   : $('.address').val()
       zipCode   : $('.zipCode').val()
       companyId : $('.companyId').val()
       vat       : $('.vat').val()
       account   : $('.account').val()
       bank      : $('.bank').val()
       swift     : $('.swift').val()
       email     : $('.email').val()
       phone     : $('.phone').val()
       fax       : $('.fax').val()
      },
        error: (model, response) =&gt;
         (@$ '.txt').text('Išsųsti nepavyko')
         (@$ '.alert').removeClass('alert-danger')
         (@$ '.alert').removeClass('alert-success')
         (@$ '.alert').addClass('alert-warning')
        success: (model, response) =&gt;
         if response.clientInfo == 0
          (@$ '.txt').text('Sėkmingai išaugota!')
          (@$ '.alert').removeClass('alert-danger')
          (@$ '.alert').removeClass('alert-warning')
          (@$ '.alert').addClass('alert-success').show()
          @model.id = response.id
          vent.trigger 'addNewClient', @model
          $('.saveClient input').val ''
          @model.clear()
         else
          (@$ '.txt').text('Išsaugoti nepavyko')
          (@$ '.alert').removeClass('alert-success')
          (@$ '.alert').removeClass('alert-warning')
          (@$ '.alert').addClass('alert-danger').show()
     )
  </code></pre>
  
  <p>This is the template </p>
  
  <pre><code>&lt;tbody class="clientList"&gt;
              &lt;script type="text/template" id="Client-String"&gt;
                  &lt;td&gt;&lt;%- company %&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%- companyId %&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%- phone %&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%- email %&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;button class="btn btn-default edit" data-toggle="modal" data-t            arget="#editClient"&gt;{% trans %}Edit{% endtrans %}&lt;/button&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;button class="btn btn-danger remove"&gt;{% trans %}Remove{% endtrans %}&lt;/button&gt;&lt;/td&gt;
              &lt;/script&gt;
              &lt;/tbody&gt;
  </code></pre>
  
  <p>and the view for that template </p>
  
  <pre><code>class Info.View.Clients extends Backbone.View
    tagName: 'tr'
  
    template: template('Client-String')
  
    events:
      'click .remove': 'destroy'
      'click .edit': 'edit'
  
    initialize: ()-&gt;
      @model.on 'change', @render, @
      @render()
  
    render: -&gt;
      @.$el.html @template @model.toJSON()
  
    edit: -&gt;
      vent.trigger 'clientEdit', @model
  
    destroy: -&gt;
      @model.destroy()
      @remove()
  
    remove: -&gt;
      @.$el.remove()
  
  
  
   class Info.View.ClientList extends Backbone.View
     el: '.clientList'
  
     initialize: ()-&gt;
      model = new Info.Model.Client
      new Info.View.Client model: model
      vent.on 'addNewClient', @appendNewClient, @
      vent.on 'clientEdit', @getClientInfo, @
      @render()
  
     render: -&gt;
       if @collection
       @collection.each(@appendNewClient, @)
  
     appendNewClient: (model)-&gt;
       @.$el.append(new Info.View.Clients(model: model).el)
  
     getClientInfo: (model)-&gt;
       $('.editForm').html(new Info.View.Edit(model: model).el)
  </code></pre>