aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-11-15 01:00:53 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-11-15 01:00:53 -0200
commit61fef761065e310a8c398bd8f52da01cb82723e6 (patch)
treefd2166dd6fc6842a8a7e43f7f212b11485d74172 /activemodel
parentb8c6c0845218fe976a3f530688c54f62813cb31a (diff)
downloadrails-61fef761065e310a8c398bd8f52da01cb82723e6.tar.gz
rails-61fef761065e310a8c398bd8f52da01cb82723e6.tar.bz2
rails-61fef761065e310a8c398bd8f52da01cb82723e6.zip
Remove argument that is accessible as attribute
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/validations/format.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/validations/format.rb b/activemodel/lib/active_model/validations/format.rb
index b6cc162582..f17105e574 100644
--- a/activemodel/lib/active_model/validations/format.rb
+++ b/activemodel/lib/active_model/validations/format.rb
@@ -17,8 +17,8 @@ module ActiveModel
raise ArgumentError, "Either :with or :without must be supplied (but not both)"
end
- check_options_validity(options, :with)
- check_options_validity(options, :without)
+ check_options_validity :with
+ check_options_validity :without
end
private
@@ -37,7 +37,7 @@ module ActiveModel
source.start_with?("^") || (source.end_with?("$") && !source.end_with?("\\$"))
end
- def check_options_validity(options, name)
+ def check_options_validity(name)
option = options[name]
if option && !option.is_a?(Regexp) && !option.respond_to?(:call)
raise ArgumentError, "A regular expression or a proc or lambda must be supplied as :#{name}"