Skip to content

Optionally inherit from ApplicationController#150

Closed
eelcoj wants to merge 1 commit into
hotwired:mainfrom
Rails-Designer:application-controller
Closed

Optionally inherit from ApplicationController#150
eelcoj wants to merge 1 commit into
hotwired:mainfrom
Rails-Designer:application-controller

Conversation

@eelcoj
Copy link
Copy Markdown

@eelcoj eelcoj commented Dec 1, 2024

This is taken from a custom override I add to all my app's lib folders.

I prefer to inherit from ApplicationController (app/javascript/controller/application_controller.js or whatever is more common/best practice) instead of Controller. Similarly how you inherit from ApplicationController in a Rails app, and not ActionController::Base.

If ApplicationController is not present, fallback to current default.

Possibly quite specific/niche, but wanted to share regardless to see what others think.

@dhh
Copy link
Copy Markdown
Member

dhh commented Mar 3, 2025

Don't think this is worth the complication in this gem.

@dhh dhh closed this Mar 3, 2025
@eelcoj eelcoj deleted the application-controller branch March 4, 2025 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants