import Ember from 'ember';
var computed = Ember.computed;

export default Ember.Controller.extend({
  queryParams: ['name'],
  name: null,

  nameField: computed.oneWay('name'),

  actions: {
    search: function() {
      this.set('name', this.get('nameField'));
    }
  }
});


import Ember from 'ember';
var computed = Ember.computed;

export default Ember.Controller.extend({
  queryParams: ['name'],
  name: '',

  nameField: computed.oneWay('name'),

  actions: {
    search: function() {
      this.set('name', this.get('nameField'));
    }
  }
});


Use empty string for name param
Use empty string for name param

This removes the query param from the URL when you search for nothing.