Does anyone know why using ruby-debuga call to debuggerthe method called before_filterhashing, paramsand sessionare not defined?
class MyExampleController < ActionController::Base
before_filter :test_hashes
def test_hashes
pp session
pp params
debugger
end
def index
end
end
(rdb:5) pp params
NameError Exception: undefined local variable or method 'params' for
(rdb:5) pp session
NameError Exception: undefined local variable or method 'session' for
Is this normal behavior or am I doing something wrong?
source
share