Skip to content

Commit

Permalink
Fixes #37847 - Support Rails 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ofedoren committed Oct 22, 2024
1 parent 27b9b6f commit 7ce103c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/helpers/job_invocations_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def preview_hosts(template_invocation)
end

def collapsed_preview(target)
title = target || 'N/A'
title = (target || 'N/A').to_s
content_tag(:h5,
:class => "expander collapsed out",
:data => { :toggle => 'collapse',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ def flattened_validation_exception
def flattened_errors
errors = Hash.new { |h, k| h[k] = [] }
# self.errors is ActiveModel::Errors, not Hash and doesn't have the #each_key method
self.errors.keys.each do |key|
messages = self.errors[key]
self.errors.attribute_names.each do |key|
messages = self.errors.messages_for(key)
invalid_objects = invalid_objects_for_attribute(key)
if invalid_objects.blank?
errors[key] = messages
Expand Down
2 changes: 1 addition & 1 deletion app/views/template_invocations/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ end
</div>

<script>
<%= render :partial => 'refresh.js' %>
<%= render partial: 'refresh', formats: :js %>
</script>
<% else %>
<%= _("Could not display data for job invocation.") %>
Expand Down
4 changes: 0 additions & 4 deletions lib/foreman_remote_execution/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ module ForemanRemoteExecution
class Engine < ::Rails::Engine
engine_name 'foreman_remote_execution'

config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
config.autoload_paths += Dir["#{config.root}/app/models/concerns"]

# Precompile any JS or CSS files under app/assets/
# If requiring files from each other, list them explicitly here to avoid precompiling the same
# content twice.
Expand Down

0 comments on commit 7ce103c

Please sign in to comment.