diff --git a/lib/trailblazer/workflow/rails.rb b/lib/trailblazer/workflow/rails.rb index f6d5daf..616537a 100644 --- a/lib/trailblazer/workflow/rails.rb +++ b/lib/trailblazer/workflow/rails.rb @@ -9,5 +9,6 @@ module Rails end require "trailblazer-pro-rails" +require "trailblazer/workflow/task/import" require_relative "rails/generator/import" require_relative "rails/generator/discover" diff --git a/lib/trailblazer/workflow/rails/generator/import.rb b/lib/trailblazer/workflow/rails/generator/import.rb index 118077e..c0dadad 100644 --- a/lib/trailblazer/workflow/rails/generator/import.rb +++ b/lib/trailblazer/workflow/rails/generator/import.rb @@ -7,7 +7,7 @@ class Import < ::Rails::Generators::Base def import_file_via_api # TODO: use endpoint logic here. - signal, (ctx, _) = Trailblazer::Developer.wtf?(Trailblazer::Pro::Editor::Import, [ + signal, (ctx, _) = Trailblazer::Developer.wtf?(Trailblazer::Workflow::Task::Import, [ { diagram_slug: slug, target_filename: target, @@ -17,7 +17,7 @@ def import_file_via_api ]) return puts("Diagram #{slug} successfully imported to #{target}.") if signal.to_h[:semantic] == :success - raise "error: #{ctx[:error_message]}" + raise "[TRB PRO] error: #{ctx[:error_message]}" end end # Import end