ActionView: fix html form attribute when IPAddr value has prefix
Motivation / Background
This Pull Request has been created because fixes #52364
Detail
This Pull Request changes to add conditional values of IPAddr class for TagHelper#tag_option. It outputs with a prefix when IPAddr value has a prefix.
Additional information
Checklist
Before submitting the PR make sure the following are checked:
- [x] This Pull Request is related to one change. Unrelated changes should be opened in separate PRs.
- [x] Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex:
[Fix #issue-number] - [x] Tests are added or updated if you fix a bug or add a feature.
- [ ] CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.
I think this is too unique a case, and that we shouldn't add an exception here only because this particular class doesn't behave with #to_s the way you expected. What about other cases out there? We have to add a case for all of them? This simply won't scale.
Sorry that is not the answer you want to hear, but I think it's the most realistic result of this feature request.
Thanks for your PR and digging into this issue in various places. :bow:
@zzak Thanks for comment.
If no one else needs it, I will try to monkey patch for my apps.