Skip to content

Instantly share code, notes, and snippets.

@jdx
Created December 6, 2012 22:46
Show Gist options
  • Save jdx/4229182 to your computer and use it in GitHub Desktop.
Save jdx/4229182 to your computer and use it in GitHub Desktop.
# How do I make this:
skip_authorization do |current_resource_owner, client|
client.application.auto_grant?
end
# Work with this:
!!instance_exec(@server.current_resource_owner, @pre_auth.client) &Doorkeeper.configuration.skip_authorization
# in both 1.8 and 1.9, without failures like this: https://travis-ci.org/applicake/doorkeeper/builds/3540040
@jdx
Copy link
Author

jdx commented Dec 6, 2012

fixed it!

!!instance_exec([@server.current_resource_owner, @pre_auth.client], &Doorkeeper.configuration.skip_authorization)

for those curious

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment