Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #1231: action_exempted.patch

File action_exempted.patch, 0.9 kB (added by anonymous, 4 years ago)
  • vendor/rails/actionpack/lib/action_controller/filters.rb

    old new  
    338338 
    339339        def action_exempted?(filter) 
    340340          case 
    341             when self.class.included_actions[filter] 
    342               !self.class.included_actions[filter].include?(action_name) 
    343             when self.class.excluded_actions[filter]  
    344               self.class.excluded_actions[filter].include?(action_name) 
     341            when ia = self.class.included_actions[filter] 
     342              !ia.include?(action_name) 
     343            when ea = self.class.excluded_actions[filter]  
     344              ea.include?(action_name) 
    345345          end 
    346346        end 
    347347    end