From 59d642faa5fa62d6761b5d5c885ebe275bc69114 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Wed, 20 Dec 2017 15:45:39 +0100 Subject: [PATCH] Fixed bug: Using alias causes error for inheriting Units because the old method is called instead of the one of the sub-class. --- .../unit/import/common/model/lookup/attributes.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/sequencer/unit/import/common/model/lookup/attributes.rb b/lib/sequencer/unit/import/common/model/lookup/attributes.rb index f645929c1..c79a43303 100644 --- a/lib/sequencer/unit/import/common/model/lookup/attributes.rb +++ b/lib/sequencer/unit/import/common/model/lookup/attributes.rb @@ -25,7 +25,12 @@ class Sequencer def attribute raise "Missing implementation of '#{__method__}' method for '#{self.class.name}'" end - alias attributes attribute + + def attributes + # alias or alias_method won't work if attribute method + # is overwritten in inheriting sub-class + attribute + end def existing_instance @existing_instance ||= begin