Skip to content

Commit

Permalink
fix for existing records
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffibm committed May 20, 2024
1 parent d00ae34 commit 5759230
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/miq_ae_class_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ def edit_method
id = x_node.split('-')
end
@ae_method = find_record_with_rbac(MiqAeMethod, id[1])
@embedded_methods = MiqAeMethod.where(:relative_path => @ae_method[:embedded_methods])
@embedded_methods = MiqAeMethod.where(:relative_path => @ae_method[:embedded_methods].map { |str| str.sub(/^\//, '') })
@selectable_methods = embedded_method_regex(@ae_method.fqname)
if playbook_style_location?(@ae_method.location)
# these variants are implemented in Angular
Expand Down Expand Up @@ -1832,7 +1832,7 @@ def ae_methods
end

def ae_method_operations
@edit[:new][:embedded_methods] = MiqAeMethod.selected_methods(params[:ids]).map(&:relative_path)
@edit[:new][:embedded_methods] = MiqAeMethod.selected_methods(params[:ids]).map { |method| "/#{method.relative_path}" }
@changed = true
render :update do |page|
page << javascript_prologue
Expand Down

0 comments on commit 5759230

Please sign in to comment.