-
-
Notifications
You must be signed in to change notification settings - Fork 211
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 customisation of the dashboard controller parent class #687
Comments
@ollym thanks for opening this issue. With experience, I think I regret the creation of
I don't have plans to remove it, but the pattern I am thinking of more strongly recommending is configuring via an initializer. Which is less pretty, but I think more resilient from the perspective of Ruby and Rails: # initializers/good_job.rb
ActiveSupport::Reloader.to_prepare do
# open up the class and put your behavior in it directly:
class GoodJob::BaseRecord # <-- probably rename this GoodJob::ApplicationRecord for consistency
# put behavior here
end
class GoodJob::ApplicationController
# put behavior here
end
end But I haven't made a decision. I am not sure. |
This was documented in #1082 |
Like you have:
GoodJob.active_record_parent_class = "ApplicationRecord"
Would be good to have similar for the dashboard:
GoodJob.dashboard_controller_parent_class = "ApplicationController"
Where we can control things like authentication more easily, for example we have a
Admin::ApplicationController
which we have all the authentication already setup as hooks.Let me know.
The text was updated successfully, but these errors were encountered: