Not every Ember upgrade goes as planned. Back out - to fight another day, by stashing your WIP to a Gist.
gem install gist
gist --login
git diff | gist -p -f wip-upgrade.diff
# -> returns a url, save the url to later restore your diff
""" | |
Git Repo: | |
branches | |
dev | |
worker | |
production | |
master | |
dev |
<?php | |
class Route { | |
public $name; | |
public $uri_templates = array(); | |
public $params = array(); | |
public function __construct($name, $uri_templates) { | |
$this->name = $name; |
var empty, get, set, | |
__hasProp = {}.hasOwnProperty; | |
get = Ember.get; | |
set = Ember.set; | |
empty = function(obj) { | |
var key; | |
for (key in obj) { | |
if (!__hasProp.call(obj, key)) continue; |
# So, this is pretty horrible. If we just encode using btoa, any UTF-8 chars cause an error. | |
# If we use either of the workarounds on MDN[1], the £ sign is encoded wrong. I suspect | |
# Excel totally sucking at encodings is the reason why. So, the workaround is, to use | |
# the MDN workaround on chars with values > 255, and allow chars 0-255 to be encoded | |
# as is with btoa. Note that if you use either of the workarounds on MDN, chars | |
# 128-255 will be encoded as UTF-8, which includeds the £ sign. This will cause excel | |
# to choke on these chars. Excel will still choke on chars > 255, but at least the £ | |
# sign works now... | |
# [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
attributes | relationships | ||||||||
---|---|---|---|---|---|---|---|---|---|
|
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
queryParams: ['test'], | |
appName:'finalizeQueryParamChange bug example', | |
actions: { | |
set_param() { | |
this.set('test', 'foo'); | |
} |
<?php | |
if ( ! preg_match( '#wp-json#', $_SERVER['REQUEST_URI'] ) && ! preg_match( '#wp-content#', $_SERVER['REQUEST_URI'] ) && ! preg_match( '#^www.#', $_SERVER['HTTP_HOST'] ) ) { | |
$https = 443 === $_SERVER['SERVER_PORT'] ? 's' : ''; | |
header( "Location: http{$https}://www.{$_SERVER['HTTP_HOST']}", true, 301 ); | |
die(); | |
} |
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
myService: Ember.inject.service('my-service'), | |
appName: 'Ember Twiddle' | |
}); |