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

Fix reloading when extending the apidoc from concern #557

Merged
merged 1 commit into from
Sep 7, 2017

Conversation

iNecas
Copy link
Member

@iNecas iNecas commented Sep 7, 2017

No description provided.

@iNecas
Copy link
Member Author

iNecas commented Sep 7, 2017

In #554, we introduce the way to extend the apidoc from concern. There was some issue, including the concerns from to_prepare block. Leading to:

Could not find method description for ExtendedController#create. Was the method defined?
...
    config.filter_parameters += [:password]
    config.to_prepare do
      ExtendedController.send(:include, Concerns::ExtendingConcern)
    end
  end
end

The code change handles the situation when the controllers get updated during the code reload to make sure we don't loose once-loaded method description that would need to get updated.

@ares
Copy link

ares commented Sep 7, 2017

Works absolutely great! Tested code changing in the concern itself as well as in the include target. @iNecas += 🥇

@iNecas iNecas merged commit 69c5bdc into Apipie:master Sep 7, 2017
@iNecas
Copy link
Member Author

iNecas commented Sep 7, 2017

Apipie-rails-0.5.3 with the fix was just released.

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

Successfully merging this pull request may close these issues.

2 participants