Skip to content

Instantly share code, notes, and snippets.

@rdavila
Created September 6, 2012 23:07
Show Gist options
  • Save rdavila/3661112 to your computer and use it in GitHub Desktop.
Save rdavila/3661112 to your computer and use it in GitHub Desktop.
class Admin.Routers.Menus extends Backbone.Router
routes:
'': 'fetchData'
fetchData: ->
Admin.Collections.MenuCategories.fetch
success: (col, resp) ->
names = col.pluck('name')
$("#menu_menu_category_id").autocomplete(data: names)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment