Closed cintamani closed 4 years ago
Given: https://github.com/DEFRA/waste-exemptions-engine/pull/256/files#diff-96eeb9eac79f0a4cb727474526cce6a9R7 I was thinking that we should start having some before_initialize method. Initially, it can just be that we add this to the BaseForm:
before_initialize
BaseForm
def initialize(registration) ... do its stuff .... after_initialize(registration) end .... private def after_initialize(registration) # do nothing end
And then in this child classes, we can just implement
def after_initialize(registration) # Do extra stuff end
when needed
This is now done
Given: https://github.com/DEFRA/waste-exemptions-engine/pull/256/files#diff-96eeb9eac79f0a4cb727474526cce6a9R7 I was thinking that we should start having some
before_initialize
method. Initially, it can just be that we add this to theBaseForm
:And then in this child classes, we can just implement
when needed