Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37852 - Support Rails 7.0 #11155

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading