View foo.js
1 2 3 4 5 6 7 8 9 10
import Ember from 'ember';
import DS from 'ember-data';
 
import { request } from 'ic-ajax';
 
export default Ember.Mixin.create({
attachment: null,
saveWithAttachment: function() {
return this.createWithAttachment();
},
View ember-cli-101-dot-com-uploading.js
1 2 3 4 5 6 7 8 9 10
import Ember from 'ember';
import { request } from 'ic-ajax';
 
export default Ember.Component.extend({
actions: {
upload: function() {
var _this = this;
var formData = new FormData();
formData.append("file", this.$('input')[0].files[0]);
var url = this.get('url');
View gruntfile.ks
1 2 3 4 5 6 7 8 9 10
module.exports = function(grunt) {
grunt.initConfig({
env: process.env,
s3: {
options: {
key: '<%= env.AWS_ACCESS_KEY_ID %>',
secret: '<%= env.AWS_SECRET_ACCESS_KEY %>',
bucket: '<%= env.AWS_BUCKET %>',
access: 'public-read',
headers: {
View foo.js
1 2 3 4 5 6 7 8 9 10
// app/utils/time-helpers.js
 
var unix = moment.unix,
months = months;
 
 
 
export {
unix,
months
View out.sh
1 2 3 4 5 6 7 8 9 10
uild successful - 10790ms.
 
Slowest Trees | Total
-------------------------------+----------------
ES3SafeFilter | 3270ms
JSHint - App | 2678ms
ES6Concatenator | 2252ms
TemplateCompiler | 863ms
 
file changed controllers/micro-tags/edit.js
View modal.js
1 2 3 4 5 6 7 8 9
openModal: function(modalName, controller) {
 
return this.render(modalName, {
into: 'application',
outlet: 'modal',
controller: controller
});
},
closeModal: function() {
View redis_controller.rb
1 2 3 4 5 6 7 8 9 10
class RedisController < ApplicationController
private
def render_from_redis(prefix, variation = nil)
manifest_id = params[:manifest_id]
 
if manifest_id.blank?
current_manifest_key = if variation
"#{prefix}:#{variation}:current"
else
"#{prefix}:current"
View index.html
1 2 3 4 5 6 7 8 9 10
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="link-to with objet and id entering in model hook" />
<meta charset="utf-8">
<title>Ember Starter Kit</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<script src="http://builds.emberjs.com/tags/v1.7.0/ember.js"></script>
View gist:879b04f845ff22f224b0
1 2 3 4 5 6 7 8 9 10
import DS from 'ember-data';
 
DS.Store.reopen({
pushRecord: function(type, record) {
var key, payload;
key = type.underscore().pluralize();
payload = {};
payload[key] = [record];
this.pushPayload(type, payload);
return this.getById(type, record.id);
View gist:8b400aa97ce3756ff731
1 2 3 4 5 6 7 8 9
model: function(){
return Ember.RSVP.hash({model1: promise, model2: promise})
}
 
 
 
----
 
model1.key1
Something went wrong with that request. Please try again.