> npm install -g repl-promised
> NODE_ENV=development node-promised
> var express = require('express'),
hbs = require('express-hbs'),
compress = require('compression'),
fs = require('fs'),
| # == Schema Information | |
| # | |
| # Table name: videos | |
| # | |
| # id :integer not null, primary key | |
| # meta_info :jsonb default({}), not null, indexed | |
| # created_at :datetime not null | |
| # updated_at :datetime not null | |
| # videoable_id :integer indexed => [videoable_type] | |
| # videoable_type :string indexed => [videoable_id] |
| class Scorecard::Cell < Cell::Concept | |
| include ActionView::RecordIdentifier | |
| def show | |
| render | |
| end | |
| private | |
| def competition_entry |
| class Scorecard::Cell < Cell::Concept | |
| include ActionView::RecordIdentifier | |
| ... | |
| class Form < Scorecard::Cell | |
| include Cell::Erb | |
| # include ActionView::Context | |
| include ActiveSupport::Configurable | |
| include ActionController::RequestForgeryProtection |
| <%= form_for form, url: form_url do |f| %> | |
| <%= f.fields_for :moves do |m| %> | |
| <%= m.hidden_field :move_id %> | |
| <%= m.text_field :score %> | |
| <% end %> | |
| <%= f.submit 'Finish Judging' %> | |
| <% end %> |
> npm install -g repl-promised
> NODE_ENV=development node-promised
> var express = require('express'),
hbs = require('express-hbs'),
compress = require('compression'),
fs = require('fs'),
| // Select specified columns on relations when fetching: | |
| new models.Post({id:1}).fetch({ | |
| withRelated: [{'tags': function(qb) { qb.column('tags.id') }}] | |
| }).then(function(post) { | |
| return post.related('tags').toJSON() | |
| }) | |
| => [ { id: 1, parent: undefined } ] |
| // setup.hbs | |
| {{#if stepOne}} | |
| <ol> | |
| <li class="active"><span class="step"><i class="icon-check"></i><span class="num">1</span></span></li> | |
| <li><a class="step" {{action "toStepTwo"}}><i class="icon-check"></i><span class="num">2</span></a></li> | |
| <li><span class="step"> <i class="icon-check"></i><span class="num">3</span></span></li> | |
| </ol> | |
| {{/if} | |
| // {{#if stepTwo}}... |
| not ok 5 PhantomJS 1.9 - Acceptance: Settings - Navigation when logged in clears unsaved settings when navigating away | |
| --- | |
| message: > | |
| Error: Assertion Failed: You have turned on testing mode, which disabled the run-loop's autorun. | |
| You will need to wrap any code with asynchronous side-effects in a run (http://localhost:7357/assets/vendor.js:14819) | |
| Log: | | |
| ... | |
| ---- |