Skip to content

Instantly share code, notes, and snippets.

@flippyhead
Created February 24, 2011 18:28
Show Gist options
  • Save flippyhead/842612 to your computer and use it in GitHub Desktop.
Save flippyhead/842612 to your computer and use it in GitHub Desktop.
namespace = @model.contructor.name.toLowerCase()
attributes = @model.toJSON()
for field, value of attributes
do (field, value)->
$(@el).find("##{namespace}_#{field}").val @model.get(value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment