From fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Sat, 29 Oct 2016 01:05:58 -0200 Subject: Add more rubocop rules about whitespaces --- activemodel/lib/active_model/validations/acceptance.rb | 2 +- activemodel/lib/active_model/validations/length.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'activemodel/lib/active_model/validations') diff --git a/activemodel/lib/active_model/validations/acceptance.rb b/activemodel/lib/active_model/validations/acceptance.rb index 4fadc795cd..9826c2fe9c 100644 --- a/activemodel/lib/active_model/validations/acceptance.rb +++ b/activemodel/lib/active_model/validations/acceptance.rb @@ -24,7 +24,7 @@ module ActiveModel class LazilyDefineAttributes < Module def initialize(attribute_definition) - define_method(:respond_to_missing?) do |method_name, include_private=false| + define_method(:respond_to_missing?) do |method_name, include_private = false| super(method_name, include_private) || attribute_definition.matches?(method_name) end diff --git a/activemodel/lib/active_model/validations/length.rb b/activemodel/lib/active_model/validations/length.rb index f73f16830f..de1524829e 100644 --- a/activemodel/lib/active_model/validations/length.rb +++ b/activemodel/lib/active_model/validations/length.rb @@ -6,7 +6,7 @@ module ActiveModel MESSAGES = { is: :wrong_length, minimum: :too_short, maximum: :too_long }.freeze CHECKS = { is: :==, minimum: :>=, maximum: :<= }.freeze - RESERVED_OPTIONS = [:minimum, :maximum, :within, :is, :too_short, :too_long] + RESERVED_OPTIONS = [:minimum, :maximum, :within, :is, :too_short, :too_long] def initialize(options) if range = (options.delete(:in) || options.delete(:within)) -- cgit v1.2.3