9 ms·
Yup. In addition to the general purpose safe navigation operator we also have Hash#dig now which helps with those pesky nested params: params.dig(:user, :addre
by gkop 11y ago
Yup. In addition to the general purpose safe navigation operator we also have Hash#dig now which helps with those pesky nested params:
params.dig(:user, :address, :city)