Code cleanup for ActionDispatch::Flash#call
The nested `if` was replaced by using `presence` which takes account for the given hash when it is `nil` or when it is empty. The `else` was removed because what it was doing was to assign to `env[KEY]` the value it already had.
Showing
想要评论请 注册 或 登录