Skip to content

Instantly share code, notes, and snippets.

@guiocavalcanti
Forked from fltiago/api.rb
Created October 8, 2012 18:18
Show Gist options
  • Save guiocavalcanti/3854022 to your computer and use it in GitHub Desktop.
Save guiocavalcanti/3854022 to your computer and use it in GitHub Desktop.
require "debugger"
class Wally < Grape::API
format :json
helpers do
def permit
@permit ||= Permit::Mechanism.new
end
end
resource :walls do
get '/' do
permit.able_to?(:read, "something")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment