Skip to content

Conversation

@jessejackson85
Copy link
Contributor

PR Description:

This PR improves the detection of Ruby on Rails partials by using regex patterns instead of tree-sitter. It extracts partial names from template files (.erb, .haml, .slim) and Ruby controller files (.rb) to create accurate RENDERS edges in the dependency graph.

Key changes:

  • Add regex-based partial extraction for more reliable detection
  • Support standard Rails partial conventions (underscore prefix, shared directories)
  • Handle various render syntaxes (render partial:, <%= render, etc.)
  • Expand supported template formats
  • Improve path resolution to find partials in different locations

Fixes the issue where partial relationships weren't properly detected in Rails applications.

Closed #136

@jessejackson85 jessejackson85 force-pushed the ruby-partial-rendering-improvements branch from 6fbafd0 to d845cb0 Compare July 14, 2025 21:02
@jessejackson85 jessejackson85 force-pushed the ruby-partial-rendering-improvements branch from 811de80 to 05c5515 Compare July 15, 2025 12:01
@jessejackson85
Copy link
Contributor Author

@Evanfeenstra Please review this PR.

@Evanfeenstra
Copy link
Collaborator

there is testing for each language

in ast/src/testing

To update whenever a new feature is added

@jessejackson85
Copy link
Contributor Author

there is testing for each language

in ast/src/testing

To update whenever a new feature is added

@Evanfeenstra Sure.

@jessejackson85
Copy link
Contributor Author

@Evanfeenstra I've pushed the newly added feature here. Please review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants