Skip to content

Instantly share code, notes, and snippets.

View ChristopherJohnson25's full-sized avatar

Christopher Johnson ChristopherJohnson25

  • Interactive Brokers
  • West Palm Beach, FL
View GitHub Profile
So bascially, user location is gotten in the application controller. This gets saved as userLocation, and accessed via computer property on other routes controllers. It's only needed on vineyard/index and vineyard/show routes. Seems like the right away to do this...
Once user location is recieved and accessible via the template, it is passed to the miles-away component along with vineyardLocation (address string, Google is smart enough to handle these, even if the user inputs wrong zips, spells things wrong etc etc).
The component miles-away then takes these two parameters and runs the long function you see in miles-away.js. Now the way this is setup seems like really poor execution. It renders how many miles away a vineyard is, but gives me no way to sort. That should make sense just by looking at the handlebars templates.
Do I put this whole list in my component? I'm using ember composable helpers, so sorting should work nicely when I can get the distanceFrom at the model level?? This is the absolute m
@ChristopherJohnson25
ChristopherJohnson25 / .travis.yml
Last active November 1, 2020 21:59
Ember/Travis Deployment Pipeline
---
language: node_js
node_js:
- "6"
sudo: false
dist: trusty
addons:
chrome: stable