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 ability to pass additional options to apipie route #269

Merged
merged 1 commit into from
Jul 28, 2014

Conversation

exAspArk
Copy link
Contributor

Hi, can we add ability to pass additional options to apipie route?
In my case I'd like to add constraints like:

Test::Application.routes.draw do
  apipie constraints: DeveloperConstraint.new
end

class DeveloperConstraint
  def matches?(request)
    request.env['warden'].authenticate? && request.env['warden'].user.has_role?(:developer)
  end
end

@iNecas
Copy link
Member

iNecas commented Jul 28, 2014

Nice, thanks!

iNecas added a commit that referenced this pull request Jul 28, 2014
Add ability to pass additional options to apipie route
@iNecas iNecas merged commit 9a60aee into Apipie:master Jul 28, 2014
@iNecas
Copy link
Member

iNecas commented Aug 8, 2014

The changes were released as part of the 0.2.3 release. Thanks for your contribution! Let the code be with you!

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