I’m trying to create an after filter for all my actions in all
controllers. I put it in application controller (application.rb).
class ApplicationController < ActionController::Base
xxxx # syntax error - intentionally
I have a Example (example_controller.rb) controller with index action.
class ExampleController < ActionController::Base
@result = “Hello, world!”
When I try to access server:3000/example/index I see my hello world
string. But it should be compile error (see “xxxx” in filter code). No
matter what I do inside the filter, this filter is not applied at all!
I’m very puzzled.
I do restart webrick after modifications to the controllers.
ruby 1.8.4 (2005-12-24) [i686-linux]