diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-05-03 13:47:46 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-03 13:47:46 +0900 |
commit | efcf71fb64319519784fe1c69fd66f36fb52e47a (patch) | |
tree | c47377497d48dcff01d0cff9b1029a3c467f58fa | |
parent | 855a9f1705d9afbd8af6a498577b4f1da900b338 (diff) | |
parent | e80d9f411ddeecad253712bc5ea965dff843bc58 (diff) | |
download | rails-efcf71fb64319519784fe1c69fd66f36fb52e47a.tar.gz rails-efcf71fb64319519784fe1c69fd66f36fb52e47a.tar.bz2 rails-efcf71fb64319519784fe1c69fd66f36fb52e47a.zip |
Merge pull request #28967 from stve/active-model-validator-kind-examples
fix ActiveModel::Validator#kind code examples
-rw-r--r-- | activemodel/lib/active_model/validator.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validator.rb b/activemodel/lib/active_model/validator.rb index 0032200ef7..1a4d13f2d0 100644 --- a/activemodel/lib/active_model/validator.rb +++ b/activemodel/lib/active_model/validator.rb @@ -109,8 +109,8 @@ module ActiveModel # Returns the kind for this validator. # - # PresenceValidator.new.kind # => :presence - # AcceptanceValidator.new.kind # => :acceptance + # PresenceValidator.new(attributes: [:username]).kind # => :presence + # AcceptanceValidator.new(attributes: [:terms]).kind # => :acceptance def kind self.class.kind end |