Skip to content

Instantly share code, notes, and snippets.

@randallb
Created April 17, 2012 20:09
Show Gist options
  • Save randallb/2408683 to your computer and use it in GitHub Desktop.
Save randallb/2408683 to your computer and use it in GitHub Desktop.
if dataSource
log "found data"
currentItem = externalData[dataSource.bind].current
if !currentItem?
break
else
renderData = currentItem.toJSON()
else if @model.get "default"
log "found default"
renderData = @model.get "default"
else
log "using name finally."
renderData = @model.get "name"
$(@el).html(@template renderData)
@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment