(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
# Test the result of config.assets.precompile | |
# | |
# Check which files will be regarded as "manifests" and thus precompiled and be | |
# available for standalone use via the /assets/<asset> URL when in production. | |
# Execute this code in your Rails console. | |
# First, you'll probably be in development mode, so add here your | |
# additional production precompile patterns you want to test against. | |
precompile = Rails.configuration.assets.precompile + [/^.+\.css$/, 'active_admin.js'] |
source 'http://rubygems.org' | |
gem 'guard' | |
gem 'guard-shell' |
import Ember from 'ember'; | |
export { dirtyHasMany, dirtyBelongsTo, dirtyMixin }; | |
var dirty = 'relationshipIsDirty'; | |
function dirtyMixin (obj) { | |
var args = Object.keys(obj); | |
var comp = Ember.computed; | |
args.push('isDirty'); | |
obj[dirty] = comp.any.apply(comp, args); |
This post is also on my blog, since Gist doesn't support @ notifications.
Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:
Ember.Controller
instead of Ember.ArrayController
or Ember.ObjectController
Ember.Controller
, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.{ | |
"app/adapters/*.js": { | |
"command": "adapter", | |
"template": [ | |
"import ApplicationAdapter from './application';", | |
"", | |
"export default ApplicationAdapter.extend({", | |
"", | |
"});" | |
], |
// helpers/ember-cli-page-object-extensions.js | |
import { buildSelector } from '../page-object'; | |
let selectableChoose = function(selector, options = {}) { | |
return { | |
isDescriptor: true, | |
value(textToSelect) { | |
wait().then(function() { |
/* | |
* Decorator on a Mirage plain-ol'-JavaScript-object factory | |
* to allow you to create Ember objects. | |
* | |
* The objects act just enough like an Ember Data model that | |
* you can use them as a drop-in replacement for DS.Model instances | |
* in many component integration tests. | |
* | |
* Returns an object with one method, `create`, that returns | |
* subclasses of Ember.Object that are created with the Mirage |