Replace the above with `redirect_to logged_in? ? current_user : root_url`?  Or perhaps:

```ruby
redirect_path = logged_in? ? current_user : root_url
redirect_to redirect_path
```