Skip to content

Skip min title validation for help/policy posts#1197

Merged
Taeir merged 4 commits intodevelopfrom
taeir/fix-validations-apply-to-help-policy
Nov 12, 2023
Merged

Skip min title validation for help/policy posts#1197
Taeir merged 4 commits intodevelopfrom
taeir/fix-validations-apply-to-help-policy

Conversation

@Taeir
Copy link
Copy Markdown
Contributor

@Taeir Taeir commented Aug 30, 2023

Seeding was no longer creating help/policy posts with title lengths < 15, due to the recent validations changes. This PR excludes help and policy documents from the min title length requirement, to allow help articles like "FAQ" to be created again.

@cellio cellio requested a review from a team August 30, 2023 20:03
Comment thread app/models/concerns/post_validations.rb Outdated
@Taeir Taeir requested a review from Oaphi November 11, 2023 17:06
Copy link
Copy Markdown
Member

@Oaphi Oaphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM (I personally prefer ternary expressions, but my background mostly includes languages where you can't assign the result of evaluating the if...else directly anyway; as it passes rubocop, all good)

@Taeir
Copy link
Copy Markdown
Contributor Author

Taeir commented Nov 12, 2023

Changes LGTM (I personally prefer ternary expressions, but my background mostly includes languages where you can't assign the result of evaluating the if...else directly anyway; as it passes rubocop, all good)

@Oaphi I was thinking about the options, but since we have 3 cases here ternary expressions seemed a bit much, and this if-else-end expression is what I had to do to make rubocop happy, so yeah 😅

@Taeir Taeir merged commit 298b9c8 into develop Nov 12, 2023
@Taeir Taeir deleted the taeir/fix-validations-apply-to-help-policy branch November 12, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: backend Changes to server-side code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants