Wishlist: revisiting subdomain access in routes.rb

Several folks on the list have, over time, expressed interest in being
to access the subdomain info inside routes.rb. This was discussed in
detail late last year by several folks:


In summary, routes can’t access the domain, so your best bet is to stick
before_filter in your application.rb.

This strikes me as an ugly hack. Everything else in Rails is so damn
is there a practical reason why we force developers to jump through
hoops to
do subdomain parsing and manipulation? In addition, this could be
an example of a place where convention could prevent every coder that
approaches this issue from creating their own semi-unique solution.
away from this particular sort of creativity is one of the primary
reasons I
love Rails.

It might be way, way too late to get anything together in time for 1.1,
I want to reopen this for discussion with an eye to the future. However,
Rails-core folks are clearly superheros, so on the off-chance this is a
“simple” addition… here it is.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs