Skip to content

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