Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes auto-correct of content_tag with hyphenated tag name #327

Merged
merged 1 commit into from
Aug 14, 2020
Merged

Fixes auto-correct of content_tag with hyphenated tag name #327

merged 1 commit into from
Aug 14, 2020

Conversation

jaredmoody
Copy link
Contributor

Allow auto-correction of tag names with hyphen, e.g. trix-editor to
tag.trix_editor instead of correcting to deprecated
tag('trix-editor') syntax.

The deprecated syntax does not support a content parameter, so the
arguments in the corrected code were incorrect when correcting a
method name with a hyphen and content, such as
content_tag('trix-editor' 'my content!')

@koic
Copy link
Member

koic commented Aug 13, 2020

This looks good to me. Can you add the changelog entry, and squash commits into one after that?
https://github.com/rubocop-hq/rubocop-rails/blob/master/CONTRIBUTING.md#changelog-entry-format

CHANGELOG.md Outdated Show resolved Hide resolved
@koic
Copy link
Member

koic commented Aug 14, 2020

Can you add the following link to the bottom of the changelog?

[@jaredmoody]: https://github.com/jaredmoody

Allow auto-correction of tag names with hyphen, e.g. `trix-editor` to
`tag.trix_editor` instead of correcting to deprecated
`tag('trix-editor')` syntax.

The deprecated syntax does not support a content parameter, so the
arguments in the corrected code were incorrect when correcting a
method name with a hyphen and content, such as
`content_tag('trix-editor' 'my content!')`
@koic koic merged commit c22496c into rubocop:master Aug 14, 2020
@koic
Copy link
Member

koic commented Aug 14, 2020

Thanks!

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