Skip to content

Instantly share code, notes, and snippets.

@mpagalan
Created September 15, 2009 13:14
Show Gist options
  • Save mpagalan/187282 to your computer and use it in GitHub Desktop.
Save mpagalan/187282 to your computer and use it in GitHub Desktop.
class BaseController < ApplicationController
before_filter :find_resource
end
class NiceController < BaseController
before_filter :find_resource :only => [:show, :edit]
logger.info filter_chain.map{|f| f.inspect}
end
looking
#<ActionController::Filters::BeforeFilter:0xb6dd3ae0 @identifier=nil, @method=:find_resource, @options={:only=>#<Set: {"edit", "show", "update"}>}, @kind=:filter>
#<ActionController::Filters::BeforeFilter:0xb6dd3ae0 @identifier=nil, @method=:find_resource, @options={:only=>#<Set: {"edit", "show", "update"}>}, @kind=:filter>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment