rails/rails — Issue #3800: Using :constraints => { :domain => XX } crashes app when accessed by IP
Author: borisd
Created: 2011-11-29 16:18:02+00:00
State: open

When trying to add conditional routes in the the form:
get 'something' => "somewhere", :constraints => { :domain => /match/ }

And trying to access the server by IP instead of hostname

Results in:
NoMethodError (undefined method `match' for nil:NilClass)

While using the ":host" directive solves the issue, the above renders ":domain" to be unusable.