From 85cbb779bc37c1c0b392bc0b679344eefe9fb975 Mon Sep 17 00:00:00 2001 From: Edmund Tay Date: Tue, 7 Jan 2025 18:12:48 +0800 Subject: [PATCH] fix: eject generator failing due to undefined source_location method (#3566) * fix: reject generator failing due to undefined source_location * fix: better source locator * fix: revert const if statement * Update eject_generator.rb --- lib/generators/avo/eject_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/avo/eject_generator.rb b/lib/generators/avo/eject_generator.rb index 0998e5937..2a6aad07e 100644 --- a/lib/generators/avo/eject_generator.rb +++ b/lib/generators/avo/eject_generator.rb @@ -120,7 +120,7 @@ def eject_component(component_to_eject = options[:component], confirmation: true # Get the component path for both, the rb and erb files rb, erb = if (component_constant = component_to_eject.safe_constantize) # If component is a constant, find the source location - source_location = component_constant.source_location + source_location = component_constant.identifier [source_location, source_location.gsub(".rb", ".html.erb")] else