Coming soon!
This lesson will be released on February 11, 2026.
Your Teacher
Chris Oliver
Hi, I'm Chris. I'm the creator of GoRails, Hatchbox.io and Jumpstart. I spend my time creating tutorials and tools to help Ruby on Rails developers build apps better and faster.
About This Episode
Optional attributes are empty strings by default, but we can clean these up as nil in Rails using normalizes
Notes
class Example < ApplicationRecord
normalizes :optional_attribute, with: -> { it.presence }
end