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 9, 2024
1 parent f0ad948 commit af40ec1
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,13 +44,13 @@ 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
end

0 comments on commit af40ec1

Please sign in to comment.