Skip to content

Instantly share code, notes, and snippets.

@plusjade
Created April 16, 2013 18:15
Show Gist options
  • Save plusjade/5398200 to your computer and use it in GitHub Desktop.
Save plusjade/5398200 to your computer and use it in GitHub Desktop.
Simple example of rails javascript-in-views refactoring
#share-on-yammer-modal.modal.fade
.modal-header
... blah
- content_for :partial_javascripts do
:plain
Gild.profileView.shareOnYammer(#{ @profile.to_json });
Gild.profileView.shareOnYammer = function(profile) {
//... some stuff
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment