Skip to content
New issue

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

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

Already on GitHub? # to your account

param_group throws undefined error unless controller is specified #779

Open
ianballou opened this issue Sep 7, 2022 · 2 comments
Open
Labels

Comments

@ianballou
Copy link

#774 (apipie-rails 0.8.2) seems to have broken some of our code in the Katello project:

    def_param_group :installed_products do
      ...
    end

    def_param_group :subscription_facet_attributes do
      ...
      param :installed_products_attributes, Array, :desc => N_("List of products installed on the host") do
        param_group :installed_products # <----- Throws "param group Api::V2::HostsController#installed_products not defined"
      end
    end

It's fixed if I change the marked line to:

        param_group :installed_products, Api::V2::HostSubscriptionsController

Shouldn't that work without specifying the controller since we're already inside the Api::V2::HostSubscriptionsController ?

@mathieujobin
Copy link
Collaborator

thanks for reporting it and including a workaround, this is very helpful.

@bruno-m-gomes
Copy link

bruno-m-gomes commented Jun 18, 2024

Stumbled upon this issue today, thanks for the workaround

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants