Skip to content

Commit 9c9920d

Browse files
committed
do not cache csrf_meta_tag
oh my.
1 parent 8078e25 commit 9c9920d

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

app/assets/javascripts/crabgrass/wiki.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ var wikiLock = {
121121
var url = this.locks.get(wikiId);
122122
this.locks.unset(wikiId); // <- prevent additional unlocking
123123
new Ajax.Request(url, {
124-
method: 'delete', asynchronous: false,
125-
parameters: {authenticity_token: $$('meta[name=csrf-token]')[0]}
124+
method: 'delete', asynchronous: false
126125
});
127126
}
128127
}

app/helpers/common/ui/layout_helper.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ def crabgrass_javascripts
127127
lines << '<![endif]-->'
128128
end
129129

130-
lines << csrf_meta_tag
131-
132130
# Autocomplete caches results in sessionStorage. After logging out, the session storage should be cleared.
133131
unless logged_in?
134132
lines.push('<script type="text/javascript">if(sessionStorage.length > 0) sessionStorage.clear();</script>')

app/views/layouts/global/_head.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/ begin scripts
1010
= crabgrass_javascripts
1111
/ end scripts
12-
12+
= csrf_meta_tag
1313
%title
1414
=h html_title
1515
=# call_hook :html_head

0 commit comments

Comments
 (0)