This file contains hidden or 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', | |
init() { | |
this.set('prop', 1); | |
this.set('computedProp', 1); | |
}, | |
This file contains hidden or 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({ | |
tagName: 'td' | |
}); |
This file contains hidden or 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
// verses.js - controller | |
import Ember from 'ember'; | |
import DS from 'ember-data'; | |
export default Ember.ObjectController.extend({ | |
actions: { | |
getAnotherVerse: function() { | |
// Here you need to understand a little bit about promises. A promise is | |
// asynchronous, so in you need to use .then() to get the value of the | |
// promise that is returned. |
This file contains hidden or 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
Playlists | |
Grunge Rock | |
=========== | |
Trophy Wife It Comes In Waves…(Neil Young) | |
Dead Confederate The Rat | |
Indie/Folk | |
========== | |
Josh Ritter The Temptation of Adam |
This file contains hidden or 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
Ember.ObservableObjectProxy = Ember.Object.extend({ | |
init: function() { | |
this._super(); | |
Ember.defineProperty(this, 'properties'); | |
this.set('properties', {}); | |
}, | |
unknownProperty: function(property) { | |
return this.get('properties.'+property); | |
}, |
This file contains hidden or 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
var promises = [ | |
Q.nfcall(db.query, args) | |
]; | |
if (condition) { | |
promises.push(Q.nfcall(db.query, args2)); | |
} | |
Q.all(promises).then(function() { | |
/* yay callback */ |
This file contains hidden or 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
/** | |
@extends Ember.Mixin | |
Implements common pagination management properties for controllers. | |
*/ | |
App.PaginationSupport = Ember.Mixin.create({ | |
hasPaginationSupport: true, | |
total: 0, |
This file contains hidden or 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 index(options={}, &block) | |
respond_with(*(with_chain(collection) << options), &block) | |
end |
This file contains hidden or 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
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html |
This file contains hidden or 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
Case.Router.reopen({ | |
location: 'history' | |
}); | |
Case.Router.map(function() { | |
this.resource('inventory', function(){ | |
this.route('review'); | |
this.route('sheets'); | |
this.resource('vehicle', { path: '/vehicle/:vehicle_id' }, function(){ | |
this.route('index'); |