Skip to content

Commit

Permalink
Fixes #37852 - Support Rails 7.0 (#11155)
Browse files Browse the repository at this point in the history
* Fixes #37852 - Support Rails 7.0

* Refs #37852 - Update VCR cassettes
  • Loading branch information
ofedoren authored Dec 10, 2024
1 parent f3402e0 commit 20331a0
Show file tree
Hide file tree
Showing 14 changed files with 16,929 additions and 106,309 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def create
host.reload
::Katello::Host::SubscriptionFacet.update_facts(host, rhsm_params[:facts]) unless rhsm_params[:facts].blank?

respond_for_show(:resource => host, :template => '../../../api/v2/hosts/show')
respond_for_show(:resource => host, :full_template => 'katello/api/v2/hosts/show')
end

def params_to_rhsm_params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def release_version
param_group :bulk_params
def traces
collection = scoped_search(Katello::HostTracer.where(host_id: @hosts.pluck(:id)), 'application', 'desc', resource_class: Katello::HostTracer)
respond_for_index(:collection => collection, :template => '../../../api/v2/host_tracer/index')
respond_for_index(:collection => collection, :full_template => 'katello/api/v2/host_tracer/index')
end

api :PUT, "/hosts/bulk/resolve_traces", N_("Resolve traces for one or more hosts")
Expand Down Expand Up @@ -253,7 +253,7 @@ def module_streams
options[:resource_class] = Katello::ModuleStream
host_module_streams = Katello::ModuleStream.available_for_hosts(@hosts)
respond_for_index(collection: scoped_search(host_module_streams, :name, :asc, options),
template: '../../../api/v2/module_streams/name_streams')
full_template: 'katello/api/v2/module_streams/name_streams')
end

api :PUT, "/hosts/bulk/change_content_source", N_("Update the content source for specified hosts and generate the reconfiguration script")
Expand Down
3 changes: 2 additions & 1 deletion app/lib/katello/api/v2/rendering.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ def respond_for_bulk_async(options = {})
def respond_with_template(action, resource_name, options = {}, &_block)
yield if block_given?
status = options[:status] || 200
template = options[:full_template] || "katello/api/v2/#{resource_name}/#{action}"

render :template => "katello/api/v2/#{resource_name}/#{action}",
render :template => template,
:status => status,
:locals => options.slice(:object_name, :root_name, :locals),
:layout => "katello/api/v2/layouts/#{options[:layout]}"
Expand Down
Loading

0 comments on commit 20331a0

Please sign in to comment.