From f5bdb718c2cc4db0441ce648e3407982bfa0fee9 Mon Sep 17 00:00:00 2001 From: ulferts Date: Thu, 31 Aug 2023 09:44:05 +0200 Subject: [PATCH] remove overrides doing the same as super() --- app/contracts/base_contract.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/contracts/base_contract.rb b/app/contracts/base_contract.rb index 66906aa8214e..de8a0209c30e 100644 --- a/app/contracts/base_contract.rb +++ b/app/contracts/base_contract.rb @@ -142,19 +142,13 @@ def writable?(attribute) writable_attributes.include?(attribute.to_s) end - def valid?(*_args) - super() - - errors.empty? - end - # Provide same interface with valid? and validate # as with AM::Validations # # Do not use alias_method as this will not work when # valid? is overridden in subclasses - def validate(*args) - valid?(*args) + def validate(*) + valid?(*) end # Methods required to get ActiveModel error messages working