This file contains hidden or 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
# template.rb | |
# Helpful links: | |
# Templates doc | |
# http://guides.rubyonrails.org/rails_application_templates.html | |
# Generator docs - in particular section 9 | |
# http://guides.rubyonrails.org/generators.html |
This file contains hidden or 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
# connecting select2 to the appropriate hooks: | |
# | |
# hard case: best_in_place's select | |
$ -> | |
# first, find the mount point | |
$('body').on 'best_in_place:activate', '.best_in_place', -> | |
# second, attach empty update() to `this` to screen the downstream calls | |
# which otherwise will cause an error |