DEV Community

[Comment from a deleted post]
Collapse
 
michaelbrooks profile image
Michael Brooks

I'm not a Ruby developer, but is it similar to a ternary operator? Basically saying if user variable is not set then get the first user from your model.

Collapse
 
val_baca profile image
Valentin Baca

it is similar, where it's like:
a = (a ? a : 2)