collin (owner)

Revisions

gist: 193025 Download_button fork
public
Public Clone URL: git://gist.github.com/193025.git
Embed All Files: show embed
filters.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
  before_filter :discover_admin
  before_filter :has_action?
  
  delegate :scope, :to => :admin_assistant
  delegate :has_action?, :to => :admin_assistant
 
  def discover_admin scope
    @admin_assistant = AdminAssistant.get(scope)
  end
 
  def has_action? action
    super and some_other_condition? # :( but I doubt delegate sticks the other method into the super chain
  end