aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/security.textile
diff options
context:
space:
mode:
authoreparreno <emili@eparreno.com>2010-11-15 19:21:40 +0100
committerXavier Noria <fxn@hashref.com>2010-11-21 03:29:43 +0100
commit3d377454dbeb9ab9fc0a4d491498c237e33e8d4b (patch)
treeeb472ff9c113bc07386cf0973e166b9abf14badb /railties/guides/source/security.textile
parentd5779efaf2375466ab557868e586b9dbd942abc1 (diff)
downloadrails-3d377454dbeb9ab9fc0a4d491498c237e33e8d4b.tar.gz
rails-3d377454dbeb9ab9fc0a4d491498c237e33e8d4b.tar.bz2
rails-3d377454dbeb9ab9fc0a4d491498c237e33e8d4b.zip
remove old school validations and replaced with new validates method. Pending: fix active_record guide
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 693645b202..6f766430c1 100644
--- a/railties/guides/source/security.textile
+++ b/railties/guides/source/security.textile
@@ -550,7 +550,7 @@ Ruby uses a slightly different approach than many other languages to match the e
<ruby>
class File < ActiveRecord::Base
- validates_format_of :name, :with => /^[\w\.\-\+]+$/
+ validates :name, format => /^[\w\.\-\+]+$/
end
</ruby>