Skip to content

Instantly share code, notes, and snippets.

TwoTap = Ember.Mixin.create
# returns either a two tap url or the product url if it's form an unsupported
# vendor
getTwoTapUrl: (product, tracking)->
return (product.get('affiliateUrl') || product.get('url')) unless tracking.get('twoTapEnabled')
uniqueToken = "#{product.get('id')}-#{tracking.get('id')}"
url = ENV.services.twotap.baseUrl
<h2 id='title'>Welcome to Ember.js</h2>
<form {{action 'createTodo' on='submit'}}>
{{input value=todo.name}}
</form>
<ul>
{{#each}}
<li>
{{name}}
<h2 id='title'>Welcome to Ember.js</h2>
<form {{action 'createTodo' on='submit'}}>
{{input value=todo.name}}
</form>
<ul>
{{#each}}
<li>
{{name}}
import icAjax from 'ic-ajax';
// ...
authenticate: function() {
var request = icAjax(this.get('createSessionUrl'), {
method: 'POST',
dataType: 'json',
data: JSON.stringify(data),
contentType: 'application/json'
});
describe('Validations', function() {
before(function() {
this.alert = stub(window, 'alert');
});
after(function() {
this.alert.restore();
});
it('validates password', function() {
EmberApp.prototype.testFiles = memoize(function() {
this.legacyTestFilesToAppend.unshift('vendor/qunit-notifications/index.js');
this.legacyTestFilesToAppend.unshift('vendor/qunit/qunit/qunit.js');
this.vendorTestStaticStyles.unshift('vendor/qunit/qunit/qunit.css');
//this.legacyTestFilesToAppend = this.legacyTestFilesToAppend.map(function(file){
//return file.replace(/^vendor\//, '');
//});
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
{{#sortable-list list=model clickAction=editContact}}
<p>
{{model.length}}
<span class="name">
{{ name }}{{#if role}}
<em>, {{ role }}</em>
{{/if}}
</span>
</p>
{{/sortable-list}}
/* globals describe, before, after, it, lazy */
import Ember from 'ember';
import startApp from './start-app';
export default function(name, callback) {
return describe(name, function() {
before(function() {
this.app = startApp();
});
import DS from 'ember-data';
import Ember from 'ember';
var attr = DS.attr;
var belongsTo = DS.belongsTo;
export default DS.Model.extend({
url: attr(),
image: attr(),
caption: attr(),