View resize_nocrop_noscale
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
def resize_nocrop_noscale(image, w,h) | |
w_original = image[:width].to_f | |
h_original = image[:height].to_f | |
if w_original < w && h_original < h | |
return image | |
end | |
# resize | |
image.resize("#{w}x#{h}") |
View authenticated_rest_adapter.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
App.AuthenticatedRESTAdapter = DS.RESTAdapter.extend({ | |
ajax: function(url, type, hash) { | |
hash = hash || {}; | |
hash.headers = hash.headers || {}; | |
hash.headers['X-AUTHENTICATION-TOKEN'] = this.authToken; | |
return this._super(url, type, hash); | |
} | |
}); |
View gist:a18c2272b75d74907c88
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
### | |
# Namespace | |
### | |
Semantic = window.Semantic = Ember.Namespace.create | |
UI_DEBUG: false | |
UI_PERFORMANCE: false | |
UI_VERBOSE: false | |
### | |
# Mixin |