Skip to content

Instantly share code, notes, and snippets.

@mackato
Created March 26, 2012 07:15
Show Gist options
  • 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