Rename app.models.Doc#indexEntry #toEntry

pull/62/merge
Thibaut 11 years ago
parent 8a86daf648
commit 68b2911738

@ -40,7 +40,7 @@ class app.Router
doc: (context, next) ->
if doc = app.docs.findBy('slug', context.params.doc) or app.disabledDocs.findBy('slug', context.params.doc)
context.doc = doc
context.entry = doc.indexEntry()
context.entry = doc.toEntry()
@triggerRoute 'entry'
else
next()

@ -30,7 +30,7 @@ class app.models.Doc extends app.Model
indexUrl: ->
"#{app.indexHost()}/#{@index_path}"
indexEntry: ->
toEntry: ->
new app.models.Entry
doc: @
name: @name
@ -40,7 +40,7 @@ class app.models.Doc extends app.Model
if hash and entry = @entries.findBy 'path', "#{path}##{hash}"
entry
else if path is 'index'
@indexEntry()
@toEntry()
else
@entries.findBy 'path', path

Loading…
Cancel
Save