This is a scaffold for setting up: an API with Rails and the ember-rails gem, persistence with Ember.Data, and a browser app using Ember.js
See source code on GitHub: pixelhandler/journal.
This is a scaffold for setting up: an API with Rails and the ember-rails gem, persistence with Ember.Data, and a browser app using Ember.js
See source code on GitHub: pixelhandler/journal.
| source 'https://rubygems.org' | |
| gem 'rails', '4.0.0' | |
| gem 'pg' | |
| gem 'sass-rails', '~> 4.0.0' | |
| gem 'uglifier', '>= 1.3.0' | |
| gem 'coffee-rails', '~> 4.0.0' | |
| gem 'jquery-rails' | |
| gem 'jbuilder', '~> 1.2' | |
| group :doc do |
.faux-select-selected needs javascript functionality which updates the content binding to the value that is selected using the invisble select box (on change).(clone the emberjs/starter-kit to get started, see the components branch on this clone of starter kit...https://github.com/Ember-SC/starter-kit/commits/components)
| // $('img.photo',this).imagesLoaded(myFunction) | |
| // execute a callback when all images have loaded. | |
| // needed because .load() doesn't work on cached images | |
| // mit license. paul irish. 2010. | |
| // webkit fix from Oren Solomianik. thx! | |
| // callback function is passed the last image to load | |
| // as an argument, and the collection as `this` | |
Sanely Edit an HTML Doc in a Browser with Ember.StateManager`
Presentation app code in referenced in the talk https://github.com/pixelhandler/ember-slide-deck
| #!/bin/sh | |
| # Called by "git push" after it has checked the remote status, | |
| # but before anything has been pushed. | |
| # | |
| # If this script exits with a non-zero status nothing will be pushed. | |
| # | |
| # Steps to install, from the root directory of your repo... | |
| # 1. Copy the file into your repo at `.git/hooks/pre-push` | |
| # 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
| describe("Async Jasmine test", function () { | |
| beforeEach(function () { | |
| this.Model = Backbone.Model; | |
| this.server = sinon.fakeServer.create(); | |
| this.server.respondWith( | |
| 'GET', | |
| '/api/model/12345', | |
| [ | |
| 200, |
| // bootstrap | |
| PX.app = new PX.App(); | |
| Backbone.history.start(); |
| var application_root = __dirname, | |
| express = require("express"), | |
| path = require("path"), | |
| mongoose = require('mongoose'); | |
| var app = express.createServer(); | |
| // database | |
| mongoose.connect('mongodb://localhost/ecomm_database'); |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>QUnit Test Suite</title> | |
| <link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-git.css" type="text/css" media="screen"> | |
| <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
| <script type="text/javascript" src="http://code.jquery.com/qunit/qunit-git.js"></script> | |
| </head> | |
| <body> |