123456789_123456789_123456789_123456789_123456789_

Class: ActionDispatch::Routing::ConsoleFormatter::Unused

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Sheet, Base
Instance Chain:
self, Sheet, Base
Inherits: ActionDispatch::Routing::ConsoleFormatter::Sheet
Defined in: actionpack/lib/action_dispatch/routing/inspector.rb

Class Method Summary

Base - Inherited

Instance Method Summary

Constructor Details

This class inherits a constructor from ActionDispatch::Routing::ConsoleFormatter::Base

Instance Method Details

#header(routes)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 264

def header(routes)
  @buffer << <<~MSG
    Found #{routes.count} unused #{"route".pluralize(routes.count)}:
  MSG

  super
end

#no_routes(routes, filter)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 272

def no_routes(routes, filter)
  @buffer <<
    if filter.none?
      "No unused routes found."
    elsif filter.key?(:controller)
      "No unused routes found for this controller."
    elsif filter.key?(:grep)
      "No unused routes found for this grep pattern."
    end
end