I have a Ruby Sinatra app and I have some code which I need to execute on all routes except for a few exceptions. How do I do this? If I wanted to execute the code on selected routes (whitelist style) I'd do this: ['/join', "/join/*", "/payment/*"].each do |path| before path do #some code end end How do I do it the other way round though (blacklist style)? I want to match all routes except '/join'
Frequently Asked Questions Frequently Asked Questions How do I make my Sinatra app reload on changes? What are my deployment options? How do I use sessions? How do I use session-based flash? Can I run Sinatra under Ruby 1.9? How do I get the “route” for the current page? How do I access helpers from within my views? How do I render partials? Can I have multiple URLs trigger the same route/handler?
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く