Skip to content

Commit 5d69a01

Browse files
committed
Revert "Return class instead of class name"
This reverts commit f328f56. The commit was causing the build for downstream projects to fail. In application.rb the start_listening_for_events call triggers business process builder which calls start_on_application_created which eventually gets to the ApplicationForm, which if it has a has_one_attached call will trigger a call to AWS client new, which triggers a missing AWS region error.
1 parent 1011ede commit 5d69a01

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/models/flex/business_process_builder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def start(step_name, on: nil, &handler)
5353
end
5454

5555
def start_on_application_form_created(step_name)
56-
event_name = "#{case_class.application_form_class.name}Created"
56+
event_name = "#{case_class.application_form_class}Created"
5757
start(step_name, on: event_name) do |event|
5858
case_class.new(application_form_id: event[:payload][:application_form_id])
5959
end

app/models/flex/case.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def self.business_process
3838
# Returns the application form class for this case class.
3939
# Subclasses can override this method to customize the application form class naming.
4040
def self.application_form_class
41-
name.sub("Case", "ApplicationForm").constantize
41+
name.sub("Case", "ApplicationForm")
4242
end
4343
attribute :application_form_id, :uuid
4444

0 commit comments

Comments
 (0)