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
gem 'capistrano', '3.5.0' | |
gem 'capistrano-bundler', '~> 1.2.0' | |
gem 'capistrano-rails', '~> 1.2.2' | |
gem 'capistrano-scm-copy', '0.7.0' | |
gem 'capistrano3-puma', '1.2.1' | |
gem 'puma', '~> 3.7' | |
gem 'rails', '~> 5.2' | |
group :development do |
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
import Ember from 'ember'; | |
import { computed } from '@ember/object'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
color: 'none', | |
isGreen: computed('', function() { | |
return this.get('color') === 'green'; | |
}), | |
isGreenCorrect: computed('color', function() { |
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
import DS from 'ember-data'; | |
import ModelMixin from 'ember-data-extensions/mixins/model'; | |
import { memoize, startCase } from 'lodash-es'; | |
import { get, set } from '@ember/object'; | |
export default class ApplicationModel extends DS.Model.extend(ModelMixin).reopenClass({ | |
attributeLabels: memoize( | |
function (this: ApplicationModel, store: any): object { | |
const labelMap = { | |
self: this.modelViewName() |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
import DS from 'ember-data'; | |
import ModelMixin from 'ember-data-extensions/mixins/model'; | |
import _ from 'lodash'; | |
const AppModel = DS.Model.extend(ModelMixin); | |
const modelViewName = _.memoize(function () { | |
<some code> | |
}, function () { | |
return this.modelName; |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
valueMap: Ember.Object.create({ | |
3600: 'One Update Per Hour', | |
86400: 'One Update Per Day', | |
604800: 'One Update Per Week', | |
2629746: 'One Update Per Month' | |
}), |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
valueMap: Ember.Object.create({ | |
3600: 'One Update Per Hour', | |
86400: 'One Update Per Day', | |
604800: 'One Update Per Week', | |
2629746: 'One Update Per Month' | |
}), |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
routeBy: "b", | |
items: ["a", "b", "c"] | |
}); |
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
import Ember from 'ember'; | |
import { | |
validator, | |
buildValidations | |
} | |
from 'ember-cp-validations'; | |
const Validations = buildValidations({ | |
'maxUpdates': validator('number', { | |
allowString: true, |
NewerOlder