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 a controller hooking feature #62

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

estum
Copy link

@estum estum commented Jan 25, 2015

Allow to define a hook in initializer, which invokes the controller class. This useful when we need to set some custom callbacks.

Usage exaple (adding basic auth):

# config/initializers/api_taster.rb

ApiTaster.controller_hook do
  http_basic_authenticate_with name: "admin", password: "123456"
end

@fredwu
Copy link
Owner

fredwu commented Jan 25, 2015

This is a great feature to have! Though as it stands it breaks the build, and please add some tests to cover this new feature too. :)

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