Skip to content

Commit

Permalink
comment out validation that Project::LifeCycleStepDefinition is not i…
Browse files Browse the repository at this point in the history
…nitialized itself
  • Loading branch information
toy committed Dec 10, 2024
1 parent 46c42ab commit 2255c17
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/models/project/life_cycle_step_definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ class Project::LifeCycleStepDefinition < ApplicationRecord

default_scope { order(:position) }

def initialize(*args)
if instance_of? Project::LifeCycleStepDefinition
# Do not allow directly instantiating this class
raise NotImplementedError, "Cannot instantiate the base Project::LifeCycleStepDefinition class directly. " \
"Use Project::StageDefinition or Project::GateDefinition instead."
end

super
end
# def initialize(*args)
# if instance_of? Project::LifeCycleStepDefinition
# # Do not allow directly instantiating this class
# raise NotImplementedError, "Cannot instantiate the base Project::LifeCycleStepDefinition class directly. " \
# "Use Project::StageDefinition or Project::GateDefinition instead."
# end
#
# super
# end

def step_class
raise NotImplementedError
Expand Down

0 comments on commit 2255c17

Please sign in to comment.