awesome. now we show code snippets in a much better way. Peeps who add to the tutorials will need to enclose code w/ <pre class="ruby></pre>

This commit is contained in:
Ken Johnson
2013-05-23 15:18:39 -04:00
parent a877e93780
commit f674a57440
7 changed files with 990 additions and 19 deletions
+10 -12
View File
@@ -37,19 +37,17 @@
<p><b>Cross-Site Request Forgery (CSRF) - The following code was taken from: /app/controllers/application_controller.rb and /app/views/layouts/application.html.erb</b></p>
<p>application_controller.rb<<p>
<p>
<font face="Courier New" style="color: rgb(69, 126, 136)">
<%= %{# Our security guy keep talking about sea-surfing, cool story bro.}%>
</br><%= %{
# protect_from_forgery
}
%>
</font>
<pre class="ruby">
# Our security guy keep talking about sea-surfing, cool story bro.
# protect_from_forgery
</pre>
</p>
<p> application.html.erb </p>
<p>
<font face="Courier New" style="color: rgb(69, 126, 136)">
<%= @meta_code_bad %>
</font>
<pre class="ruby">
<%= @meta_code_bad %>
</pre>
</p>
</div>
</div>
@@ -83,9 +81,9 @@
By Default, the protect_from_forgery directive is added under the application_controller.rb at project creation. However, occasionally developers turn it off (comment out) because of issues with JS. The solution around the JS problem is to add the following code within the header section of the application.html.erb file (or any other application layout file).
</p>
<p>
<font face="Courier New" style="color: rgb(69, 126, 136)">
<pre class="ruby">
<%= @meta_code_good %>
</font>
</pre>
</p>
</div>
</div>