diff options
Diffstat (limited to 'examples/rails_app-2.3.4/app/controllers/application_controller.rb')
-rw-r--r-- | examples/rails_app-2.3.4/app/controllers/application_controller.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/rails_app-2.3.4/app/controllers/application_controller.rb b/examples/rails_app-2.3.4/app/controllers/application_controller.rb index 11df5d1..eccce4e 100644 --- a/examples/rails_app-2.3.4/app/controllers/application_controller.rb +++ b/examples/rails_app-2.3.4/app/controllers/application_controller.rb @@ -1,3 +1,10 @@ class ApplicationController < ActionController::Base - helper :all # include all helpers, all the time + # helper :all # include all helpers, all the time + defined?($upr) or before_filter do + # grab the backend in case we forget to set it (or if we're using DRb) + defined?($upr) or ObjectSpace.each_object(Upr::InputWrapper) do |x| + $upr ||= x.backend + end + end + end |