I am stumped with the following problem:
- A module, which is mixed into a controller, defines two methods, ‘a’
- ‘a’ calls ‘b’
- ‘b’ might be overriden in the controller
- when ‘a’ is called as a ‘before_filter’, it always calls the version
of ‘b’ defined in the mixin module, regardless of whether the controller
defines its own ‘b’.
- when ‘a’ is called as an action, it correctly invokes the ‘right’
version of ‘b’.
puts “A.b called”
class FooController < ApplicationController
puts “C.b called”
I’m at a loss. Could anyone toss me a clue? Thanks!