Hi all,

I am stumped with the following problem:

* A module, which is mixed into a controller, defines two methods, 'a'
and 'b'
* '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'.

For example:

module A
  def a
    b
  end

  def b
    puts "A.b called"
  end
end

class FooController < ApplicationController
  include A

  before_filter :a

  def b
    puts "C.b called"
  end
end

I'm at a loss.  Could anyone toss me a clue?  Thanks!

Brian
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to