Skip to content

Instantly share code, notes, and snippets.

Ryan Scott Subtletree

  • Wellington, New Zealand
Block or report user

Report or block Subtletree

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
addName: function() {
if (this.get("name")) {
const newName = this.get("name");
const newRecord = this.store.createRecord("info", { name: newName });
@Subtletree
Subtletree / adapters.application.js
Last active Aug 30, 2018 — forked from YoranBrondsema/adapters.application.js
Non-async relationship bug (3.2.1)
View adapters.application.js
import Adapter from "ember-data/adapters/json-api";
export default Adapter.extend();
View ember fetch service
import Service from '@ember/service';
import fetch from 'fetch';
export default Service.extend({
session: service(),
request({ url, method, cache, headers = {}, contentType, body } = {}) {
headers = this._processHeaders(headers);
return fetch(url, {
method,
@Subtletree
Subtletree / controllers.application.js
Last active Aug 10, 2018
cp validations parentAttribute
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
applicationController: Ember.inject.controller('application'),
config: Ember.computed.reads('applicationController.config'),
stats: Ember.computed.reads('applicationController.model.stats'),
chartOptions: Ember.computed("model.hashrate", {
get() {
console.log(this.get('model'));
var e = this,
View models.car.js
import DS from 'ember-data';
import Ember from 'ember';
import { belongsTo, hasMany } from "ember-data/relationships";
export default DS.Model.extend({
make: DS.attr('string'),
owner: belongsTo('owner', { polymorphic: true })
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
templateString: 'Template string {{a}}'
});
View components.child-component.js
import Ember from 'ember';
export default Ember.Component.extend({
});
View components.component-one.js
import Ember from 'ember';
export default Ember.Component.extend({
});
You can’t perform that action at this time.