Skip to content

Commit

Permalink
Do not push code containing debugger, you fuckwit
Browse files Browse the repository at this point in the history
  • Loading branch information
pikesley committed Dec 30, 2015
1 parent aa00aaf commit ae3f351
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/views/grid.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
latestCell(j)
)
} else if (j['type'] === 'graph') {
debugger
ecks = Object.keys(j['data'][0])[0]
why = Object.keys(j['data'][0])[1]
var points = [
Expand Down Expand Up @@ -40,8 +39,10 @@
})

function latestCell(json) {
fixedDate = moment(json['data'][json['data'].length -1][json['date-field']], 'YYYY-MM-DD').format('dddd Do MMMM')
content = '<p>Last ' + json['title'] + ' was on</p><h2>' + fixedDate + ' (n days / weeks / months ago)</h2>'
d = json['data'][json['data'].length -1][json['date-field']]
fixedDate = moment(d, 'YYYY-MM-DD').format('dddd Do MMMM')
age = moment(d, 'YYYY-MM-DD').fromNow()
content = '<h1>Last ' + json['title'] + ' was on</h1><h2>' + fixedDate + '</h2><h3>(' + age + ')</h3>'
return cellContent(json['id'], content)
}

Expand Down

0 comments on commit ae3f351

Please sign in to comment.