Adding before_filter from inculded Module

Hi,

so I've got my nice pagination module that I'm mixing into
application.rb. It all works really nice, except for my before_filter
definition: When I put it into the module, my app starts throwing 500-
errors. Obviously I can't add this from a module the way I'm calling
it directly in application.rb or specific controllers, because the
before_filter class method seems to be out of scope or something. Is
there a way to achieve this some other way?

Thanks in advance and greetings,
Christoph

Really no ideas on how to do this?

You can also use ActiveRecord::Concer and put model related methods to
included block.

For example:

require 'active_support/concern'

module Foo
  extend ActiveSupport::Concern

  included do
    before_filter :bar
  end
end