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.

Andrew White's latest activity

Friday, June 25 2010
4970 Glob parameters in route ignore regexp requirements was updated in Ruby on Rails
  • Andrew White
    • Milestone cleared.
    • State changed from new to open
    • Assigned user set to José Valim
    by Andrew White at 3:49 PM

    Patch posted inline as LH attachments appear to be broken

    From 38613c364f4025912fbd0923b2d872851db50176 Mon Sep 17 00:00:00 2001
    From: Andrew White <andyw@pixe...
  • Andrew White
    Andrew White created the ticket at 3:47 PM

    Routes which have a regexp requirement for a glob parameter ignore that requirement. The problem is in rack-mount but the attached patch is a test case for this...

2478 :defaults not in path cause "No matching segment exists" error was updated in Ruby on Rails
  • Andrew White
    • Milestone cleared.
    • State changed from stale to resolved
    • Assigned user changed from josh to Andrew White
    by Andrew White at 3:46 PM

    This appears to be working now:

      # routes.rb
      resources :users, :defaults => { :locale => 'en' }
    
      andyw$ rails c
      >> app.users_path
      => "/users"
    

    Please ...

1939 Bad routing recognition with globbing/format/requirements was updated in Ruby on Rails
  • Andrew White
    • State changed from open to resolved
    • Assigned user set to Andrew White
    by Andrew White at 2:44 PM

    This seems to be working now:

      match '/:locale/*path.:format', :to => 'articles#show'
    
      # GET /en/this/is/a/long/path.html
      # => {"format"=>"html", "action"...
2536 .:format feature breaks URL compliance (rfc1738) - should be optional was updated in Ruby on Rails
  • Andrew White
    • State changed from new to open
    by Andrew White at 12:31 PM

    I've had a good go at fixing this today and I've determined that's it's not possible to do it in such a way that works well for the general case. The main stumb...

4832 Can't create a route with an prefix optional segment that contains both stati... was updated in Ruby on Rails
  • Andrew White
    • Assigned user set to Andrew White
    by Andrew White at 9:29 AM

    Paul, can you rebase your patch against the latest HEAD?

4963 router doesn't accept conditions regexp with start of line/string char was updated in Ruby on Rails
  • Andrew White
    Andrew White commented at 8:11 AM

    You don't need the anchor as all routes are anchored at the start. If what you're trying to do is to make sure that if the id param starts with an number then r...

  • Andrew White
    • State changed from open to invalid
    by Andrew White at 6:56 AM

    You can't use regexp anchors within routing constraints as the whole route is compiled into a larger regexp that begins with \A and may end with \Z (depending o...

4966 routing constraints not working properly with regex was updated in Ruby on Rails
  • Andrew White
    Andrew White commented at 7:08 AM

    To match http://localhost:3000/person/ME the routes would be:

    R4963::Application.routes.draw do |map|
      resources :users
      match 'person/:id' => 'users#show', ...
  • Andrew White
    • State changed from new to invalid
    by Andrew White at 7:06 AM

    Because you specified a single character id with the regexp