aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-03-26 12:11:23 +0000
committerGareth Rees <gareth@mysociety.org>2014-03-26 13:02:51 +0000
commitd0472b0c7d81ff1182342af22b586a931b055ba4 (patch)
treead08c7d960f241986b0b53e87ae4bd629644b28d
parent868f8f0d1e2085ebfdcb38d0a568bca8cbb92370 (diff)
Add missing csrf_meta_tags helper
http://api.rubyonrails.org/v3.2.13/classes/ActionView/Helpers/CsrfHelper.html#method-i-csrf_meta_tags > I was getting a ActionController::InvalidAuthenticityToken destroy error when using the Destroy method in my Rails 3 app. Turns out, when I was migrating to Rails 3, I forgot to include this in the html header. – http://therailworld.com/posts/34-ActionController-InvalidAuthenticityToken-with-Destroy-action
-rw-r--r--app/views/layouts/admin.html.erb2
-rw-r--r--app/views/layouts/default.html.erb2
-rw-r--r--app/views/layouts/no_chrome.html.erb2
3 files changed, 6 insertions, 0 deletions
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb
index c1f9335b1..2147f22e1 100644
--- a/app/views/layouts/admin.html.erb
+++ b/app/views/layouts/admin.html.erb
@@ -2,6 +2,8 @@
<html lang="en-gb">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" >
+ <%= csrf_meta_tags %>
+
<title><%= site_name %> admin<%= @title ? ":" : "" %> <%=@title%></title>
<%= javascript_include_tag "admin" %>
diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb
index 52b718be8..6775ed781 100644
--- a/app/views/layouts/default.html.erb
+++ b/app/views/layouts/default.html.erb
@@ -2,6 +2,8 @@
<html lang="<%= I18n.locale %>">
<head>
<meta charset="utf-8">
+ <%= csrf_meta_tags %>
+
<title>
<% if @title %>
<%=@title%> - <%= site_name %>
diff --git a/app/views/layouts/no_chrome.html.erb b/app/views/layouts/no_chrome.html.erb
index e613b8ca2..a4278ab24 100644
--- a/app/views/layouts/no_chrome.html.erb
+++ b/app/views/layouts/no_chrome.html.erb
@@ -2,6 +2,8 @@
<html lang="<%= I18n.locale %>">
<head>
<meta charset="utf-8">
+ <%= csrf_meta_tags %>
+
<title>
<% if @title %>
<%=@title%> - <%= site_name %>