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

Disable Rails/ContentTag #3

Merged
merged 1 commit into from
Feb 18, 2021
Merged

Disable Rails/ContentTag #3

merged 1 commit into from
Feb 18, 2021

Conversation

ig3io
Copy link
Contributor

@ig3io ig3io commented Feb 18, 2021

Context

Rubocop enforces #tag instead of #content_tag even though they are not the same right now, with crucial differences.

Issue in Rubocop suggesting it shouldn’t enforce the change in all cases:

rubocop/rubocop-rails#260

PR that disables the cop in the Foreman Ansible repo:

Incident in Timon

We’ve updated the merchant /edit form with a few changes because we have moved some limits configuration from one place of the DB to another.

When creating a new method that renders a field, Rubocop told us to use #tag instead of #content_tag (because they are similar in the latest version of Rails)… and we did.

This broke the merchant /edit form, nesting fields inside fields inside fields.

This commit ended up fixing the problem: https://github.com/sequra/timon/commit/54b033e0b1a9e527e3ab0d207638b7010ce55349

Rubocop enforces #tag instead of #content_tag even though they are not
the same right now, with crucial differences. More info:

rubocop/rubocop-rails#260
@ig3io ig3io merged commit f81ce21 into master Feb 18, 2021
@ig3io ig3io deleted the disable-content-tag-cop branch February 18, 2021 13:14
@VidgarVii VidgarVii mentioned this pull request May 4, 2021
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.

4 participants