diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-07-24 01:48:17 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-07-24 01:48:17 +0000 |
commit | 1e1f93fd10f186a764cdff0e89936c55274171a9 (patch) | |
tree | f65a6f126c2716fce779a8e01747918d6eb13ac5 /activerecord/CHANGELOG | |
parent | 230615b2860165368b95aa31a75d719b0b0c379f (diff) | |
download | rails-1e1f93fd10f186a764cdff0e89936c55274171a9.tar.gz rails-1e1f93fd10f186a764cdff0e89936c55274171a9.tar.bz2 rails-1e1f93fd10f186a764cdff0e89936c55274171a9.zip |
Added :unless clause to validations (closes #8003) [monki]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r-- | activerecord/CHANGELOG | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 886d049de0..5cb626f91a 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,15 @@ *SVN* +* Added :unless clause to validations #8003 [monki]. Example: + + def using_open_id? + !identity_url.blank? + end + + validates_presence_of :identity_url, :if => using_open_id? + validates_presence_of :username, :unless => using_open_id? + validates_presence_of :password, :unless => using_open_id? + * Fix #count on a has_many :through association so that it recognizes the :uniq option. Closes #8801 [lifofifo] * Fix and properly document/test count(column_name) usage. Closes #8999 [lifofifo] |