Skip to content

SalihaShahid/partial_inspector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Partial Inspector

A tiny, developer-focused gem to help you find where your Rails partials are used.

When working on large Rails projects, it's easy to lose track of where a partial is rendered throughout the codebase. partial_inspector scans your project and shows exactly which files render a given partial, making it much easier to refactor, test or remove unused partials confidently.

Installation

gem install partial_inspector

How it works?

  1. Open irb

  2. Require the gem:

    require "partial_inspector"
    

Find where a partial is used

  1. Run the scanner:

    PartialInspector.scanner.inspect_files_rendering_partial('path/to/partial')
    
  2. Example Output

    image

Find unused partials

  1. Run the scanner:

    PartialInspector.scanner.scan_unused_partials
    
  2. Example Output

    image

Find partial tree

  1. Run the scanner:

    PartialInspector.scanner.inspect_partial_tree('path/to/partial')
    
  2. Example Output

    image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors