Report abuse

routes.rb

1
2
3
4
  map.with_options(:controller => 'property') do |property|
    property.property             '/property/:id',                          :action => 'index'
  end

app/controller/backend/foo_controller.rb

1
2
3
4
5
6
  redirect_to "/property/#{property_id}"

!!  OR (tested with both)

  redirect_to property_url(:id => @property_id)

test/functional/backend/foo_controller_test.rb

1
2
  assert_redirected_to "/property/#{@property.id}"

gives

1
2
3
4
response is not a redirection to all of the options supplied (redirection is <{"action"=>"index", "id"=>"1", "controller"=>"backend/property"}>), difference: <{"controller"=>"property"}

in r4248, passes in r4247