From 30f8e89c404cba46ce2702e327eef38036ace968 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 17 Jun 2015 14:40:28 -0800 Subject: [PATCH] Rough cut: compare. --- app/helpers/get-property.js | 8 ++++ app/pods/application/template.hbs | 15 ++++--- app/pods/compare/controller.js | 47 ++++++++++++++++++++++ app/pods/compare/route.js | 4 ++ app/pods/compare/template.hbs | 32 +++++++++++++++ app/pods/index/route.js | 6 ++- app/router.js | 4 +- tests/unit/helpers/get-property-test.js | 10 +++++ tests/unit/pods/compare/controller-test.js | 12 ++++++ tests/unit/pods/compare/route-test.js | 11 +++++ 10 files changed, 140 insertions(+), 9 deletions(-) create mode 100644 app/helpers/get-property.js create mode 100644 app/pods/compare/controller.js create mode 100644 app/pods/compare/route.js create mode 100644 app/pods/compare/template.hbs create mode 100644 tests/unit/helpers/get-property-test.js create mode 100644 tests/unit/pods/compare/controller-test.js create mode 100644 tests/unit/pods/compare/route-test.js diff --git a/app/helpers/get-property.js b/app/helpers/get-property.js new file mode 100644 index 0000000..6b2308d --- /dev/null +++ b/app/helpers/get-property.js @@ -0,0 +1,8 @@ +import Ember from 'ember'; + +// This will be unneccesary when ember 2.0 lands +export function getProperty(params) { + return Ember.get(params[0], params[1]); +} + +export default Ember.HTMLBars.makeBoundHelper(getProperty); diff --git a/app/pods/application/template.hbs b/app/pods/application/template.hbs index 245a185..729e634 100644 --- a/app/pods/application/template.hbs +++ b/app/pods/application/template.hbs @@ -4,18 +4,21 @@ {{/link-to}} {{#if session.isAuthenticated}}