-
Notifications
You must be signed in to change notification settings - Fork 376
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
Ability to specify parent controller #478
Comments
Which breaks the app and Thus my final class Ahoy::BaseController < API::APIController
private
def ahoy
@ahoy ||= Ahoy::Tracker.new(controller: self, api: true)
end
end |
Hey @heaven, thanks for the suggestion. There could probably be a |
@ankane this sounds like a good option. I'll try preparing a pull request, perhaps over the weekend. |
Hi @ankane, on a similar note, would you also entertain a PR to to move https://github.com/ankane/ahoy/blob/master/app/controllers/ahoy/base_controller.rb#L8-L33 into a mixin? I have a use case where I want to define behavior for a specific namespace. For now, I'm just going to copy & paste the above code into my controller, but I would like to avoid the duplication. Thanks! |
Hi @ankane, any progress with PR? Thanks. |
We try using Ahoy with a React.js application and need to add custom token authentication to controllers. The gem inherits from the
ApplicationsController
which isn't used in our application for the API and doesn't allow us to apply token-based authentication.As a workaround I've reopened the base controller and included some of the required concerns:
But in our case, it doesn't seem right to me that it inherits from the
ApplicationsController
.The text was updated successfully, but these errors were encountered: