def current_controller?(*args)
      args.any? { |v| v.to_s.downcase == controller.controller_name }
    end
def current_controller?(*args)
      args.any? { |v| v.to_s.downcase == controller.controller_name }
    end
Check if a particular controller is the current one

 args - One or more controller names to check

 Examples

   # On TreeController
   current_controller?(:tree)           # => true
   current_controller?(:commits)        # => false
   current_controller?(:commits, :tree) # => true