rails/rails — comment on commit 4ef74536940ea4c8c7f8c2cb0252bfe5f0db6fdf
File:  line 0
By mkdynamic:

I'm not convinced that this is actually an improvement:

1. There is a still a dependency of name in the condition and inside the conditional, except now it is 'request_id'
2. Adds an assignment in the if condition, which is arguably a risky idiom
3. It introduces another require (and another dependency)

One alternative to address the 2nd point, although this is possibly harder to parse:

```ruby
id = env['HTTP_X_REQUEST_ID'].presence and id.gsub(/[^\w\d\-]/, "").first(255)
```

Very minor, and mainly thinking out loud...