diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-10-06 01:03:14 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-10-07 22:23:41 +0300 |
commit | 38fbfb9fe6d52e1a36b16ccc2a9da9ae01561cca (patch) | |
tree | 973fcb06bbeca87e5329af71b60ee5127ee66722 /app | |
parent | 1f11096c17ac1ea1bd9b62d661795e32af854e48 (diff) |
Require jquery.turbolinks in all JS specs
Side-effect: This simplifies the requiresInput handler
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/behaviors/requires_input.js.coffee | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/assets/javascripts/behaviors/requires_input.js.coffee b/app/assets/javascripts/behaviors/requires_input.js.coffee index 8318fe435b3..79d750d1847 100644 --- a/app/assets/javascripts/behaviors/requires_input.js.coffee +++ b/app/assets/javascripts/behaviors/requires_input.js.coffee @@ -34,6 +34,5 @@ $.fn.requiresInput = -> $form.on 'change input', fieldSelector, requireInput -# Triggered on standard document `ready` and on Turbolinks `page:load` events -$(document).on 'ready page:load', -> +$ -> $('form.js-requires-input').requiresInput() |