aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/presence.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/validations/presence.rb')
-rw-r--r--activemodel/lib/active_model/validations/presence.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations/presence.rb b/activemodel/lib/active_model/validations/presence.rb
index 4fd60621cd..518bc8a952 100644
--- a/activemodel/lib/active_model/validations/presence.rb
+++ b/activemodel/lib/active_model/validations/presence.rb
@@ -26,8 +26,7 @@ module ActiveModel
# The method, proc or string should return or evaluate to a true or false value.
#
def validates_presence_of(*attr_names)
- configuration = { :on => :save }
- configuration.update(attr_names.extract_options!)
+ configuration = attr_names.extract_options!
# can't use validates_each here, because it cannot cope with nonexistent attributes,
# while errors.add_on_empty can