changeset 90:d100218b96c9

Disables csrf for pastes/show.
author Edho Arief <edho@myconan.net>
date Tue, 06 Nov 2012 11:25:10 +0700
parents de4ce9ce1cc1
children bfa612a1d56f
files app/views/layouts/application.html.erb app/views/pastes/show.html.erb
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/views/layouts/application.html.erb	Tue Nov 06 11:16:47 2012 +0700
+++ b/app/views/layouts/application.html.erb	Tue Nov 06 11:25:10 2012 +0700
@@ -5,7 +5,9 @@
   <title><%= html_title %></title>
   <%= stylesheet_link_tag    "application", :media => "all" %>
   <%= javascript_include_tag "application" %>
-  <%= csrf_meta_tags %>
+  <% unless @skip_csrf %>
+    <%= csrf_meta_tags %>
+  <% end %>
 </head>
 <body>
 
--- a/app/views/pastes/show.html.erb	Tue Nov 06 11:16:47 2012 +0700
+++ b/app/views/pastes/show.html.erb	Tue Nov 06 11:25:10 2012 +0700
@@ -1,4 +1,5 @@
 <% provide :title, 'Show' %>
+<% @skip_csrf = true %>
 <div class="page-header">
   <h1>Paste</h1>
 </div>