Skip to content

skip_action is undefined #180

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

Closed
wants to merge 1 commit into from
Closed

skip_action is undefined #180

wants to merge 1 commit into from

Conversation

koenpunt
Copy link

@koenpunt koenpunt commented Jun 1, 2016

Do not merge

skip_action never existed, the preferred method now is calling all the skip methods individually.

What is the purpose of skipping all callbacks?

@ankane ankane closed this in 5977264 Jul 26, 2016
@ankane
Copy link
Owner

ankane commented Jul 26, 2016

Hey @koenpunt, thanks for reporting. It looks like skip_action_callback is the correct name.
http://apidock.com/rails/v4.2.1/AbstractController/Callbacks/ClassMethods/skip_filter

The purpose is to prevent any ApplicationController callbacks from interfering with Ahoy, while still allowing the user to use methods like current_user that are defined in ApplicationController.

@ankane
Copy link
Owner

ankane commented Jul 26, 2016

Nevermind, looks like that's deprecated as well :(

ankane added a commit that referenced this pull request Jul 26, 2016
@koenpunt
Copy link
Author

The purpose is to prevent any ApplicationController callbacks from interfering with Ahoy, while still allowing the user to use methods like current_user that are defined in ApplicationController.

Wouldn't is be easier to extend from ActionController::Base then? And forward helper calls or something. Or just add a current_user method?

@ankane
Copy link
Owner

ankane commented Jul 26, 2016

This is how Ahoy originally was built (changed to ApplicationController at 0.1.3).

I'm not sure how you could forward calls to ApplicationController from ActionController::Base, but open to a PR if you can figure out a solution. While extending ApplicationController adds a bit of complexity for Ahoy, I don't see the harm in the current approach.

GabKlein pushed a commit to GabKlein/ahoy that referenced this pull request Nov 24, 2016
GabKlein pushed a commit to GabKlein/ahoy that referenced this pull request Nov 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants