Skip to content

Instantly share code, notes, and snippets.

@vangberg
Created December 12, 2009 00:43
Show Gist options
  • Save vangberg/254641 to your computer and use it in GitHub Desktop.
Save vangberg/254641 to your computer and use it in GitHub Desktop.
def not_allowed(route, methods)
methods.each do |method|
send method do
halt 405
end
end
end
not_allowed '/get', :put, :delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment