Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Configurable tld_length for subdomains

#5215

I just watched the RailsCast on subdomains and it struck me that calling request.subdomain(tld_length) isn't very maintainable. Please find attached a patch that adds a configurable tld_length to ActionDispatch.

The only thing missing in the patch is a test for the Railtie part. I've manually tested it in an app but I wasn't sure as to the best way to go about writing a unit test for it.

Reported by Simon Jefford · July 27th, 2010 @ 03:43 PM

State: committed
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Simon Jefford
    Simon Jefford

    Figured out where the initializer tests are. I've attached a new patch.

    July 27th, 2010 @ 04:00 PM

  2. Simon Jefford
  3. Simon Jefford
  4. Simon Jefford
    Simon Jefford

    This has now been applied by wycats via a pull request to rails/rails and can now be closed.

    September 11th, 2010 @ 11:32 AM

  5. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to committed
    • Importance changed from to Low

    September 12th, 2010 @ 02:04 AM