-
Notifications
You must be signed in to change notification settings - Fork 21
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
allow containing application to add before_action
to front ends
#75
Comments
Related: #33 |
update: i think i'd prefer the 'inherit from
re that 2nd point: i'm not doing something exactly like this, but similar. raising an exception which signals "access is denied", & which is then handed by a |
Allowing me to add concerns into |
Another option... Devise allows the main application to configure which controller the devise controllers will inherit from. code references: |
problem
before_action
to a front end build is via a monkey patch. this is brittle & a likely source for unexpected behaviorfor example:
possible solutions
i'm not stuck on either of these. just trying to brainstorm some options.
inherit from ::ApplicationController
change FrontEndBuilds::ApplicationController to inherit from
::ApplicationController
. This gives the containing application a way to addbefore_action
& other hooks without monkey patchingsupport a per-frontend
before_action
explicitlythis might be even nicer than the
::ApplicationController
change, but i'm not sure how this would work exactly. (where/how would my:do_authentication_things
method be defined?)cc @samselikoff
The text was updated successfully, but these errors were encountered: