Follow-up from "Fix bug where create MR toggle wasn't inspected correctly"
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=436935) </details> <!--IssueSummary end--> The following discussion from !139047 should be addressed: - [ ] @schin1 started a [discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/139047#note_1707110733): > Looking at https://gitlab.com/gitlab-org/gitlab/-/merge_requests/139047#note_1703639433, I think perhaps we could follow-up in a separate issue regarding `ActiveModel::Type::Boolean.new.cast` vs `Gitlab::Utils.to_boolean`. > > ``` > ➜ gitlab git:(sc1-buffered-counter-migrate) ✗ rg ActiveModel::Type::Boolean > ee/spec/support/llm.rb > 5: real_ai_request_bool = ActiveModel::Type::Boolean.new.cast(ENV['REAL_AI_REQUEST']) > > ee/app/models/concerns/identity_verifiable.rb > 93: ActiveModel::Type::Boolean.new.cast(phone_number_exemption_attribute.value) > > app/models/concerns/cascading_namespace_setting_attribute.rb > 259: ActiveModel::Type::Boolean.new.cast(value) > > ``` > > I see only 4 instances (inclusive of this) where `ActiveModel::Type::Boolean.new` so perhaps the issue could target the entire project as to whether we should favour `Gitlab::Utils.to_boolean` over `ActiveModel::Type::Boolean`. > > This is not blocking so as they are both functionally correct and battle-tested (one in Rails and one in GitLab) I'm setting auto-merge.
issue