Skip to content

Instantly share code, notes, and snippets.

View cameronb23's full-sized avatar
🚗
grinding

Cameron Butler cameronb23

🚗
grinding
View GitHub Profile
@tehprofessor
tehprofessor / sinatra_before_filter.rb
Created April 14, 2012 20:07
Sinatra before filter selection using path + http method as qualifier
# As always, I hope I didn't reinvent the wheel or do something stupid... If I have please let me know!
#
# I'm currently using this with async_sinatra; haven't tested it without (sorry!)
#
# Example method usage:
#
# before_filter [[:apost, "/users/?"] do
# require_login
# end