Skip to content

Commit

Permalink
Modified authenticity_token used by JS to only show up when running o…
Browse files Browse the repository at this point in the history
…n Rails 2
  • Loading branch information
matthew committed Mar 17, 2008
1 parent 9154381 commit 451ef0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions templates/generic_views/list.html.erb
Expand Up @@ -11,10 +11,12 @@
<%= submit_tag "Show Me" %>
<% end %>
<!-- Embedded authenticity token for use in JavaScript that sends custom AJAX requests -->
<div id="authenticity_token" style="display: none">
<%= form_authenticity_token if protect_against_forgery? %>
</div>
<% if Rails::VERSION::MAJOR >= 2 -%>
<!-- Embedded authenticity token for use in JavaScript that sends custom AJAX requests -->
<div id="authenticity_token" style="display: none">
<%= form_authenticity_token if protect_against_forgery? %>
</div>
<% end -%>

<div id="streamlined_list">
<div class="actions" id="list-filter">
Expand Down
10 changes: 6 additions & 4 deletions templates/generic_views/list.rhtml
Expand Up @@ -11,10 +11,12 @@
<%= submit_tag "Show Me" %>
<% end %>
<!-- Embedded authenticity token for use in JavaScript that sends custom AJAX requests -->
<div id="authenticity_token" style="display: none">
<%= form_authenticity_token if protect_against_forgery? %>
</div>
<% if Rails::VERSION::MAJOR >= 2 -%>
<!-- Embedded authenticity token for use in JavaScript that sends custom AJAX requests -->
<div id="authenticity_token" style="display: none">
<%= form_authenticity_token if protect_against_forgery? %>
</div>
<% end -%>

<div id="streamlined_list">
<div class="actions" id="list-filter">
Expand Down

0 comments on commit 451ef0b

Please sign in to comment.