Skip to content

Instantly share code, notes, and snippets.

@kimardenmiller
Created March 8, 2013 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimardenmiller/5119126 to your computer and use it in GitHub Desktop.
Save kimardenmiller/5119126 to your computer and use it in GitHub Desktop.
new-hub.coffee
class app.Views.Hubs extends Backbone.View(
template: JST["hubs/new"]
initialize: ->
@model.on "reset", @render.bind(this)
render: ->
@$el.html @template(hubs: @model.toJSON())
this
fetchProposalsWithParams: (event) ->
event.preventDefault()
target = $(event.target)
@model.fetch data: $.param(filter: target.data("hubs-type"))
target.addClass "active"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment