Conversation
… column names Agent-Logs-Url: https://github.com/activeadmin-plugins/capybara_active_admin/sessions/7498bf2c-1012-4f45-a573-e5f8a7124f08 Co-authored-by: senid231 <8393857+senid231@users.noreply.github.com>
Agent-Logs-Url: https://github.com/activeadmin-plugins/capybara_active_admin/sessions/7498bf2c-1012-4f45-a573-e5f8a7124f08 Co-authored-by: senid231 <8393857+senid231@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix error in have_table_cell when using slashes in column names
Fix table_cell_selector generating invalid CSS class for column names with slashes
Apr 8, 2026
senid231
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
have_table_cell(column: 'Country / Region')would build the selectortd.col.col-country_/_region— a valid-looking but never-matching CSS class — instead oftd.col.col-country_region, which is what Active Admin actually generates.Changes
lib/capybara/active_admin/selectors/table.rb: Updatedtable_cell_selectorto strip non-alphanumeric characters before converting spaces to underscores and squeezing duplicates:spec/lib/selectors/table_spec.rb: Unit tests fortable_cell_selectorcovering slash-separated labels ('Country / Region'), parenthesized suffixes ('Price (USD)'), and standard multi-word names.