Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #4090 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Redirect to index from an action with an id makes /index explicit

Reported by: david@loudthinking.com Assigned to: ulysses
Priority: normal Milestone: 1.1
Component: ActiveRecord Version: 1.0.0
Severity: normal Keywords:
Cc: nseckar@gmail.com

Description

If you're on /shop/buy/1 and redirect_to :action => "index", then you go to /shop/index instead of /shop. That's just plain ugly ;)

Change History

03/05/06 20:34:53 changed by david

The failing test for it:

def test_action_left_off_when_id_is_recalled
  rs.draw do
    rs.connect ':controller/:action/:id'
  end
  assert_equal ['/post', []], rs.generate(
    {:controller => 'post', :action => 'index'},
    {:controller => 'post', :action => 'show', :id => '10'}
  )
end

03/05/06 20:35:49 changed by anonymous

  • cc set to nseckar@gmail.com.

03/25/06 21:27:18 changed by anonymous

  • keywords deleted.

08/22/06 07:18:37 changed by ulysses

Fixed by new routes. Test case added in [4805]

08/22/06 07:18:45 changed by anonymous

  • status changed from new to closed.
  • resolution set to fixed.