Display 0 instead of blank field if reposCount is null
This commit is contained in:
parent
8c3e92faea
commit
8f91eee610
|
@ -5,8 +5,13 @@ require 'travis/model'
|
||||||
login: Ember.attr('string')
|
login: Ember.attr('string')
|
||||||
name: Ember.attr('string')
|
name: Ember.attr('string')
|
||||||
type: Ember.attr('string')
|
type: Ember.attr('string')
|
||||||
reposCount: Ember.attr(Number)
|
_reposCount: Ember.attr(Number, key: 'repos_count')
|
||||||
|
|
||||||
urlGithub: (->
|
urlGithub: (->
|
||||||
"http://github.com/#{@get('login')}"
|
"http://github.com/#{@get('login')}"
|
||||||
).property()
|
).property()
|
||||||
|
|
||||||
|
# TODO: maybe it would be good to add a "default" value for Ember.attr
|
||||||
|
reposCount: (->
|
||||||
|
@get('_reposCount') || 0
|
||||||
|
).property('_reposCount')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user