Fixing subdomain_fu With Named Routes (Rails 2.2)
Tuesday, December 2nd, 2008We recently upgraded our project that was using subdomain_fu to rails 2.2 and the previous fix no longer works.
Turns out the solution is even easier in rails 2.2 than 2.1. Open up lib/subdomain_fu/routing_extensions.rb and put this bit of code at the very bottom:
ActionController::UrlRewriter::RESERVED_OPTIONS << :subdomain
Is this the correct way? Doesn’t seem to be since we’re modifying a “constant”, but it seems to work.
