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

Add an option to provide another superclass other than ApplicationController #618

Open
hdoan741 opened this issue Nov 20, 2020 · 0 comments · May be fixed by #903
Open

Add an option to provide another superclass other than ApplicationController #618

hdoan741 opened this issue Nov 20, 2020 · 0 comments · May be fixed by #903

Comments

@hdoan741
Copy link

InheritedResource::Base inherits from ::ApplicationController and that's the source of a lot of issues for us during development. (We use it with ActiveAdmin). ApplicationController can be touched by many people and be reloaded but InheritedResource::Base is only loaded once. This leads to confusing behavior or breaking behavior with ActiveAdmin.

Also, we have an ApplicationController subclassing ActionController::API (for API applications), Inherited Resource/ActiveAdmin wouldn't work and we would have to change our ApplicationController code for it to work.

See this related issue in ActiveAdmin repo: activeadmin/activeadmin#2334

Request: Allowing InheritedResource::Base to inherit from a custom controller, or from ActionController::Base.
For example: It can inherit from an InheritedResource::BaseController, and that file is generated. It can subclass ApplicationController but user can change it to subclass a different controller if they want.

jaynetics added a commit to jaynetics/inherited_resources that referenced this issue Mar 3, 2024
@jaynetics jaynetics linked a pull request Mar 3, 2024 that will close this issue
jaynetics added a commit to jaynetics/inherited_resources that referenced this issue Jul 14, 2024
jaynetics added a commit to jaynetics/inherited_resources that referenced this issue Jul 15, 2024
jaynetics added a commit to jaynetics/inherited_resources that referenced this issue Jul 15, 2024
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 a pull request may close this issue.

1 participant