I have a bunch of controllers in a namespace Foo.
I’d like to apply a before_filter 'require_user' to all of them, but not to other controllers, that do not belong to Foo namespace.
Is there any way to accomplish this besides explicitly invoking a before_filter method in each controller?
You could have a
FooControllerclass which includes thebefore_filterand then use that as the base class for all controllers in that namespace.