Closed mnort9 closed 3 years ago
Hey @mnort9, have you tried skip_before_action :track_ahoy_visit
in ApplicationController
and before_action :track_ahoy_visit
in the ones where you want to enable it?
Cleaning up issues
@ankane How are you? I've add the skip_before_action on ApplicationController and enabling to controllers that I want, but keeps saving visits from any page. There is possible to deactivate the default behavior of track all visits?
Is it possible to enable ahoy only in certain controllers/actions? The only way I see to accomplish this is by adding
skip_before_action :track_ahoy_visit
to other controllers.Also, I notice the
exclude_method
option can do this, but it would be easier if there were a controller-level enable option soexclude_method
is not called by every route in the application.I also tried setting
Ahoy.server_side_visits = false
and addedbefore_action :track_ahoy_visit
to an individual controller, but doesn't work.