Created
July 30, 2014 14:48
-
-
Save tadast/cb7618b26c7d5cd3d02a to your computer and use it in GitHub Desktop.
https://github.com/alphasights/guides/pull/14 explanation
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
# As per https://github.com/alphasights/guides/pull/14 | |
# Instead of | |
$ -> | |
if $('.js_money_index').length | |
# all your page-specific logic | |
# Use a [dispatcher](https://coderwall.com/p/mhvucw) with | |
# controllers/money_controller.js.coffee | |
class Internal.MoneyController | |
index: -> | |
new Internal.MoneyTableControls(".js_money_index") | |
# views/money_table_controls.js.coffee | |
Internal.MoneyTableControls | |
constructor: (selector) -> | |
@table = $(selector) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment