File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change
1
+ document . addEventListener ( 'turbolinks:load' , function ( ) {
2
+ $ . ajaxSetup ( {
3
+ beforeSend : function ( xhr ) {
4
+ Rails . CSRFProtection ( xhr ) ;
5
+ } ,
6
+ } ) ;
7
+ } ) ;
Original file line number Diff line number Diff line change 7
7
//= require_directory ./lib
8
8
9
9
function applicationReady ( ) {
10
- $ ( " .selectize" ) . selectize ( ) ;
11
- $ ( " select[data-bulk-row-edit]" ) . bulkRowEdit ( ) ;
10
+ $ ( ' .selectize' ) . selectize ( ) ;
11
+ $ ( ' select[data-bulk-row-edit]' ) . bulkRowEdit ( ) ;
12
12
$ ( ) . bulkRowSelect ( ) ;
13
- $ ( " body" ) . chartkickAutoReload ( ) ;
13
+ $ ( ' body' ) . chartkickAutoReload ( ) ;
14
14
setupDataTables ( ) ;
15
15
setupHighcharts ( ) ;
16
16
$ ( '[data-toggle="popover"]' ) . popover ( ) ;
17
17
$ ( '[data-message-live-preview="textarea"]' ) . messageLivePreview ( ) ;
18
18
setupSimpleMde ( ) ;
19
19
setupEmailEvents ( ) ;
20
20
setupManageForms ( ) ;
21
+
22
+ $ . ajaxSetup ( {
23
+ beforeSend : function ( xhr ) {
24
+ Rails . CSRFProtection ( xhr ) ;
25
+ } ,
26
+ } ) ;
21
27
}
22
28
23
- document . addEventListener ( " turbolinks:load" , applicationReady ) ;
29
+ document . addEventListener ( ' turbolinks:load' , applicationReady ) ;
You can’t perform that action at this time.
0 commit comments