From f2edde699aaa8e34e0607cdb6d69161986d5f9f6 Mon Sep 17 00:00:00 2001 From: Mauro George Date: Wed, 1 Jul 2015 18:19:33 -0300 Subject: [PATCH] Keep consistency on allow_blank and allow_nil qualifiers After some discussion[1] was decided that these qualifiers do not accept any parameter. https://github.com/thoughtbot/shoulda-matchers/pull/722 --- .../active_model/validate_inclusion_of_matcher.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb b/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb index 9bb63251b..6cde2ad18 100644 --- a/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb +++ b/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb @@ -302,13 +302,13 @@ def in_range(range) self end - def allow_blank(allow_blank = true) - @options[:allow_blank] = allow_blank + def allow_blank + @options[:allow_blank] = true self end - def allow_nil(allow_nil = true) - @options[:allow_nil] = allow_nil + def allow_nil + @options[:allow_nil] = true self end