aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/CHANGELOG
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2011-03-11 13:35:23 +0800
committerJosé Valim <jose.valim@gmail.com>2011-04-10 18:49:28 +0800
commit58594be680e8712c9e7352f184e15972d02cd4af (patch)
treeb53b6b145b980d8f4ccc833052a2aa8e87eb7904 /activemodel/CHANGELOG
parent22a3416298523d5e8ecb432a263e4bee9441e6c5 (diff)
downloadrails-58594be680e8712c9e7352f184e15972d02cd4af.tar.gz
rails-58594be680e8712c9e7352f184e15972d02cd4af.tar.bz2
rails-58594be680e8712c9e7352f184e15972d02cd4af.zip
Add support for proc or lambda as an option for InclusionValidator, ExclusionValidator, and FormatValidator
You can now use a proc or lambda in :in option for InclusionValidator and ExclusionValidator, and :with, :without option for FormatValidator
Diffstat (limited to 'activemodel/CHANGELOG')
-rw-r--r--activemodel/CHANGELOG9
1 files changed, 9 insertions, 0 deletions
diff --git a/activemodel/CHANGELOG b/activemodel/CHANGELOG
index 3082c7186a..03287fac7a 100644
--- a/activemodel/CHANGELOG
+++ b/activemodel/CHANGELOG
@@ -1,5 +1,14 @@
*Rails 3.1.0 (unreleased)*
+* Add support for proc or lambda as an option for InclusionValidator,
+ ExclusionValidator, and FormatValidator [Prem Sichanugrist]
+
+ You can now supply Proc, lambda, or anything that respond to #call in those
+ validations, and it will be called with current record as an argument.
+ That given proc or lambda must returns an object which respond to #include? for
+ InclusionValidator and ExclusionValidator, and returns a regular expression
+ object for FormatValidator.
+
* Added ActiveModel::SecurePassword to encapsulate dead-simple password usage with BCrypt encryption and salting [DHH]
* ActiveModel::AttributeMethods allows attributes to be defined on demand [Alexander Uvarov]