aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/security.textile
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-07-25 20:59:18 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2010-07-25 20:59:18 -0300
commit93e6dd12372d0b825069c440ddd48e62e0100cbb (patch)
tree7d882238534289604c10890eef1e8443ae18d850 /railties/guides/source/security.textile
parent6aa12535881e00f156cf7ddacaba123ed181e015 (diff)
downloadrails-93e6dd12372d0b825069c440ddd48e62e0100cbb.tar.gz
rails-93e6dd12372d0b825069c440ddd48e62e0100cbb.tar.bz2
rails-93e6dd12372d0b825069c440ddd48e62e0100cbb.zip
Changed returning with tap on guides
Diffstat (limited to 'railties/guides/source/security.textile')
-rw-r--r--railties/guides/source/security.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/security.textile b/railties/guides/source/security.textile
index 60108d5ab3..8ce0001080 100644
--- a/railties/guides/source/security.textile
+++ b/railties/guides/source/security.textile
@@ -286,7 +286,7 @@ When filtering user input file names, _(highlight)don't try to remove malicious
<ruby>
def sanitize_filename(filename)
- returning filename.strip do |name|
+ filename.strip.tap do |name|
# NOTE: File.basename doesn't work right with Windows paths on Unix
# get only the filename, not the whole path
name.sub! /\A.*(\\|\/)/, ''