aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/CHANGELOG.md
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-02 23:56:12 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-02 23:57:00 -0300
commit86062005a73589dc4919cfac401ce061f061c6a0 (patch)
treee12b9e1621ef050d069c77937051ee51d9fa0ff8 /activemodel/CHANGELOG.md
parent454d820bf0a18fe1db4c55b0145197d70fef1f82 (diff)
downloadrails-86062005a73589dc4919cfac401ce061f061c6a0.tar.gz
rails-86062005a73589dc4919cfac401ce061f061c6a0.tar.bz2
rails-86062005a73589dc4919cfac401ce061f061c6a0.zip
Revert "Merge pull request #7826 from sikachu/master-validators-kind"
This reverts commit 4e9f53f9736544f070e75e516c71137b7eb49a7a, reversing changes made to 6b802cdb4f5b84e1bf49aaeb0e994b3be6028af9. Revert "Don't use tap in this case." This reverts commit 454d820bf0a18fe1db4c55b0145197d70fef1f82. Reason: Is not a good idea to add options to this method since we can do the same thing using method composition. Person.validators_on(:name).select { |v| v.kind == :presence } Also it avoids to change the method again to add more options.
Diffstat (limited to 'activemodel/CHANGELOG.md')
-rw-r--r--activemodel/CHANGELOG.md10
1 files changed, 0 insertions, 10 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md
index 2a5598e1b2..2c966943ee 100644
--- a/activemodel/CHANGELOG.md
+++ b/activemodel/CHANGELOG.md
@@ -1,15 +1,5 @@
## Rails 4.0.0 (unreleased) ##
-* `ActiveModel::Validators#validators_on` now accepts a `:kind` option which will filter out the
- validators on a particular attribute based on its kind.
-
- Person.validators_on(:name)
- # => [#<ActiveModel::Validations::PresenceValidator:0x007fe604914e60 @attributes=[:name], @options={}>,
- # #<ActiveModel::Validations::InclusionValidator:0x007fe603bb8780 @attributes=[:age], @options={:in=>0..99}>]
-
- Person.validators_on(:name, kind: :presence)
- # => [#<ActiveModel::Validations::PresenceValidator:0x007fe604914e60 @attributes=[:name], @options={}>]
-
* Add `ActiveModel::ForbiddenAttributesProtection`, a simple module to
protect attributes from mass assignment when non-permitted attributes are passed.