This project is archived and is in readonly mode.
2.3.4 routes regression
Reported by Sam Ruby | September 17th, 2009 @ 03:07 PM
The following script described in section 21.2 of Agile Web Development with Rails, Edition 3 behaves differently in Rails 2.3.4 than it did in any prior version of Rails, and in fact, differently than the current Rails 3.0 head does:
http://media.pragprog.com/titles/rails3/code/e1/routing/config/rout...
In particular, the way this code interacts with the following predefined routes in Depot changed:
http://media.pragprog.com/titles/rails3/code/depot_t/config/routes.rb
The script actually can run in irb, whereas the book describes script/console. To see the script/console behavior under irb, change the initial require statements to: require 'config/environment.rb'.
Again, this behavior is specific to 2.3.4, this worked in Rails 1, and all versions of Rails 2 up to and including 2.3.3. It also works in 3.0-pre.
The simplest way to reproduce this is as follows:
$ git clone git://github.com/rubys/awdwr.git $ cd awdwr $ ruby makedepot.rb 6.1-21.2 $ cd work/depot $ irb ../../data/code/e1/routing/config/routes_for_blog.rb $ ruby script/console < ../../data/code/e1/routing/config/routes_for_blog.rb
Note that when the unmodified script is run under irb the last line output is:
=> "http://www.example.com/blog/2002"
And when run under script/console the last line output is:
Comments and changes to this ticket
-
Sam Ruby September 17th, 2009 @ 04:56 PM
Agreed. I've verified that #3198 happens in 2.3.4 but not 2.3.3.
-
CancelProfileIsBroken September 25th, 2009 @ 12:14 PM
- State changed from new to invalid
Expected behavior - see discussion on #3198.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Tags
Referenced by
- 3198 nested resource routes not generated correctly (rails 2.3) https://rails.lighthouseapp.com/projects/8994/tickets/32...