Created
January 31, 2015 00:32
-
-
Save detournemint/fbc75d110bc9948ab802 to your computer and use it in GitHub Desktop.
Ajax call to set a model attribute in coffeescript from ember.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax | |
url: "http://10.0.0.75:8080/packages/" +model.get('id')+"/apk/analytics/selectors" | |
headers: | |
Authorization: 'Basic ' + Cookies.utils.readCookie('spch') | |
success: (response) -> | |
model.set("selectors", $.map response.selectors, (val) -> val['selector_type']) | |
error: () -> | |
console.log "error" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment