This file contains 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
function labeledCheckboxes (proposals, answers) { | |
// check pre-conditions | |
if (_(proposals).isEmpty()) return []; | |
if !(_(proposals).isArray && _.every(proposals, _.isString)) return []; | |
if !(_(proposals).isArray && _.every(proposals, _.isBoolean)) return []; | |
if (_(answers).size() > _(proposals).size()) return []; | |
// etc |
This file contains 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
if (_(proposals).isEmpty()) return []; | |
if (_(proposals).isNotArrayOfString()) return []; | |
if (_(answers).isNotArrayOfBoolean()) return []; | |
if (_(answers).size() > _(proposals).size()) return []; |
This file contains 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({ | |
answersDidChange: Ember.on('init', Ember.observer('answers', function() { | |
// some side effect of salutation changing | |
console.log('answers changed to ' + this.get('answers')); | |
})), | |
didInsertElement: function() { | |
console.log('answers ' + this.get('answers')); | |
let array = JSON.parse(this.get('answers')); |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Ruban</title> | |
<meta charset="utf-8" /> | |
<link rel="stylesheet" href="bower_components/normalize-css/normalize.css" /> | |
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css" /> | |
<link rel="stylesheet" href="bower_components/highlightjs/styles/tomorrow.css" /> | |
<link rel="stylesheet" href="bower_components/ruban/css/ruban.min.css" /> | |
<link rel="stylesheet" href="bower_components/ruban/css/ruban-print.min.css" media="print" /> |
NewerOlder