Created
April 25, 2012 20:28
-
-
Save hamannp/2493093 to your computer and use it in GitHub Desktop.
Render rails form inside backbone view : Will it work?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.ProfileEditView = Backbone.View.extend | |
template: null | |
el: $('#somecontainer') | |
initialize: () -> | |
this.el.html = this.getProfileEditform() | |
events: { "click .submit" : "submit" } | |
submit: () -> | |
this.el.html = @putProfileEditForm() | |
getProfileEditform: () -> | |
# do something Ajaxy with JQuery to GET /user/edit.html | |
putProfileEditForm: () -> | |
# do something Ajaxy with JQuery to PUT /user/update.html | |
window.ProfileEdit = new ProfileEditView() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment