Skip to content
Snippets Groups Projects

Remove EnumWithNil helper

Merged Igor Drozdov requested to merge id-remove-enum-with-nil into master

What does this MR do and why?

Commit that introduced the change: 0665a8f7

Enums are working correctly with nil values in Rails 6.1, we can remove the helper.

public_send(:"#{name}_for_database") == value is used instead and "#{name}_for_database" returns nil when the database value is nil.


Even more context, Rails 7 changed the method signature of enum method: !90907 (e621267c)

Edited by Igor Drozdov

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Peter Leitzen resolved all threads

    resolved all threads

  • merged

  • Peter Leitzen mentioned in commit bfe5e5f0

    mentioned in commit bfe5e5f0

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading