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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(optional): Add optional helper text for optional attributes #832

Conversation

SheldonNunes
Copy link

What does this PR do and why is it necessary?

This PR adds the feature support to add optional helper text to tasks.

How does this PR work?

  • Adds a new method required_parameter? that checks if the PresenceValidator is well.. uh present for a given attribute
  • In the erb file it will display an optional helper text if required_parameter? returns false.

What could go wrong?

  • Existing maintenance tasks might not have enforced the use of PresenceValidators (validates :post_ids, presence: true) and may mean that some properties that are required are incorrectly marked as optional.

馃帺 馃帺 馃帺 馃帺 馃帺

image

@etiennebarrie
Copy link
Member

As explained in #889 he gem is really meant for data migrations, aimed at developers, and we don't think we need to add more logic to show data that can easily be inferred by looking at the task's code.

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.

None yet

2 participants