lib/scrivener/contrib.rb in scrivener-contrib-0.0.1 vs lib/scrivener/contrib.rb in scrivener-contrib-1.0.0
- old
+ new
@@ -1,14 +1,10 @@
require_relative "ohm" if defined?(Ohm)
class Scrivener
module Validations
def assert_confirmation(att, error = [att, :not_confirmed])
- confirmation = :"#{att}_confirmation"
-
- if assert_present(confirmation, error)
- assert(send(confirmation) == send(att), error)
- end
+ assert(send(:"#{att}_confirmation") == send(att), error)
end
def assert_minimum_length(att, val, error = [att, :too_short])
assert(send(att).to_s.length >= val, error)
end