diff --git a/assets/scripts/lib/travis/adapter.coffee b/assets/scripts/lib/travis/adapter.coffee index 3ea2e657..42ce5eca 100644 --- a/assets/scripts/lib/travis/adapter.coffee +++ b/assets/scripts/lib/travis/adapter.coffee @@ -94,7 +94,7 @@ Travis.Adapter = Ember.RESTAdapter.extend url = this.buildURL(record.constructor, get(record, primaryKey), record) self = this - return this.ajax(url, record.toJSON(), "PATCH").then (data) -> + return this.ajax(url, record.toJSON(), "PUT").then (data) -> self.didSaveRecord(record, data) return record diff --git a/assets/scripts/lib/travis/adapters/env_vars.coffee b/assets/scripts/lib/travis/adapters/env_vars.coffee index 00eba0df..440bc2fe 100644 --- a/assets/scripts/lib/travis/adapters/env_vars.coffee +++ b/assets/scripts/lib/travis/adapters/env_vars.coffee @@ -8,3 +8,14 @@ Travis.EnvVarsAdapter = Travis.Adapter.extend url = "#{url}?repository_id=#{repo_id}" url + + saveRecord: (record) -> + primaryKey = get(record.constructor, 'primaryKey') + url = this.buildURL(record.constructor, get(record, primaryKey), record) + self = this + + return this.ajax(url, record.toJSON(), "PUT").then (data) -> + self.didSaveRecord(record, data) + return record + +