enum order rails code example Example: rails order nil last Photo.order('collection_id DESC NULLS LAST') # NULLs come last