Skip to content
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

Add if and unless filter options #166

Merged
merged 4 commits into from
Apr 24, 2015
Merged

Conversation

gonzalo-bulnes
Copy link
Owner

As a developer
In order to be able to scope token authentication in a fine-grained way
I want the :if and :unless ActiveSupport callbacks options to be supported by acts_as_token_authentication_handler_for

Example:

# app/controllers/some_controller.rb

acts_as_token_authentication_handler_for User, :only =>[:show], unless: lambda { |controller| controller.request.format.html? }

See #155

This is a complement to the :only and :except filter options.
See #65

Fixes #155
These are the dependencies that are used to run the test suite.
@gonzalo-bulnes gonzalo-bulnes merged commit a5ca746 into master Apr 24, 2015
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.

1 participant