x = Post.first ? do_foo(x) : do_bar # does the assignment, then evaluates the result
A nice shorthand in my opinion, so the python way isn't a cure-all :)
(x = Post.first) ? do_foo(x) : do_bar
x = Post.first ? do_foo(x) : do_bar # does the assignment, then evaluates the result
A nice shorthand in my opinion, so the python way isn't a cure-all :)