Skip to content

Instantly share code, notes, and snippets.

@mackato
Created March 26, 2012 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mackato/2203639 to your computer and use it in GitHub Desktop.
Save mackato/2203639 to your computer and use it in GitHub Desktop.
declare filter when module is included
module Foo
def self.included(base)
base.class_eval do
before_filter :admin_required
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment