Actions
Feature #18332
opena ? b
Feature #18332:
a ? b
Status:
Open
Assignee:
-
Target version:
-
Description
It would be a shortcut for a ? b : nil:
e.g.
"#{current_path == "/" ? "font-bold"}"
"#{user.admin? ? "text-red-600"}"
Doing a && b returns false which converted to a string gives "false".
When nil converts to a string it gives "".
I would use it mostly in string interpolations.
Actions