Permalink
Browse files

Step 4: Being able to halt from callbacks

  • Loading branch information...
1 parent d85579f commit d08f1b439263746ceacc233e0448f1e68f9f1ad7 Carl Lerche committed Aug 27, 2009
Showing with 5 additions and 0 deletions.
  1. +5 −0 sinatrails.rb
View
@@ -6,13 +6,18 @@
module Sinatra
class Base < ActionController::Metal
include ActionController::RackConvenience
+ include AbstractController::Callbacks
class << self
# Set @_routes on child classes
def inherited(klass)
klass.class_eval { @_routes = [] }
end
+ # Sinatra uses the before keyword instead of
+ # before_filter, so let's alias the two.
+ alias before before_filter
+
# A helper method that provides a nice API
# for setting arbitrary settings
def set(name, value)

0 comments on commit d08f1b4

Please sign in to comment.