Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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