There was an error while loading. Please reload this page.
Rails/Presence
I often see the following pattern (especially when controller parameters are processed), which could be written more compactly with .presence:
.presence
# bad foo.present? ? foo.bar : nil foo.blank? ? nil : foo.bar foo.bar if foo.present? # good foo.presence&.bar