> When FooBehaviors module is included, it also extends the including
> class with the FooBehaviors::ClassMethods module.  You can find out
> more by looking at the differences between include and extend.
> 
> http://railstips.org/2009/5/15/include-verse-extend-in-ruby
> 
> Best,
> Michael Guterl


Michael,

Thanks for your response.  Your url was helpful and by following the 
inheritance tree I found the code that includes skip_before_filter:

  Base.class_eval do
    [ Filters, Layout, Benchmarking, Rescue, Flash, MimeResponds, 
Helpers,
      Cookies, Caching, Verification, Streaming, SessionManagement,
      HttpAuthentication::Basic::ControllerMethods, 
HttpAuthentication::Digest::ControllerMethods,
      RecordIdentifier, RequestForgeryProtection, Translation
    ].each do |mod|
      include mod
    end

but I still feel like skip_before_filter is a dangling method call in 
the following code:

class SlidesController < ApplicationController
  skip_before_filter :verify_authenticity_token

I tried creating a simple example (using what your url illustrated) but 
it does not work.  Here is my toy  The first 'call_me' invocation is 
what I am assuming is equivalent to the skip_before_filter call:

module Test

  def self.include(base)
    base.extend(ClassMethods)
  end

  module ClassMethods

    def call_me
      puts "Class method"
    end
  end
end

module Test2
  def call_me
    puts "second mixin called"
  end
end

class Tester
  include Test, Test2
  call_me()#toy.rb:23: undefined method `call_me' for Tester:Class 
(NoMethodError)

  def initialize
    super
    call_me()
    puts "A tester was built"
  end

end

Tester.new

I should mention that I am seeing these 'dangling' calls more and more 
as I look through what the scaffolding generated so I would like a clue!

Thanks,

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