lib/restpack_web/rails/controller.rb in restpack_web-0.2.21 vs lib/restpack_web/rails/controller.rb in restpack_web-0.4.1
- old
+ new
@@ -1,15 +1,11 @@
-module RestPack
- module Web
- module Rails
- module Controller
- def self.included(base)
- base.send(:before_filter, :include_restpack)
- end
-
- def include_restpack
- @restpack = RestPack::Web::Context.new(request.env)
- end
- end
+module RestPack::Web::Rails
+ module Controller
+ def self.included(base)
+ base.send(:before_filter, :setup_restpack_context)
end
+
+ def setup_restpack_context
+ @restpack = RestPack::Web::Context.new(request.env)
+ end
end
-end
\ No newline at end of file
+end