-
Notifications
You must be signed in to change notification settings - Fork 468
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
Extension points for parameters #330
Comments
I guess the biggest thing here is I want to be able to add extensions in the context of the controller to make it easier for plugins doing alias_method_chain. I think both of the examples you showed, the block would be executed inside the Apipie DSL. In the example I had constructed in Foreman (stbenjam/foreman@ffc9009), I had to call the models individually in each param group ( So specifically in the plugin case, I'd like to have it all bundled up in some concern I could just include in the various controllers, that would extend I'm not sure if that's useful to anyone but Foreman. |
@iNecas @stbenjam - This issue pops up again ( Foreman #16490) , would love to try and promote it |
And another one Foreman #17678 |
Due to the way the param groups are implemented, it was not possible/easy to allow extending on that level (as we can't never be sure, if the param group was already included somewhere). However, extending on per action basis should work for most cases. See #554 for the implementation. |
Fixed via #554 |
We have a Rails app with highly-plugable architecture, where it's possible to add model attributes to from an external engine. So let's say the host app has something like this (putting the strong params aside):
I could have something like this in a plugin code:
The
:extend
keyword would mean that this param group should be included when the body of the person param is being evaluated. Similarly, to extend some param group, one would go:The text was updated successfully, but these errors were encountered: