This project is archived and is in readonly mode.
[PATCH] load initializers before routing
Reported by phrewww | January 16th, 2010 @ 05:43 PM | in 3.0.2
in rails 3, when irregular inflections used, routes are not created correctly.
ActiveSupport::Inflector.inflections do |inflect|
inflect.irregular 'yazi', 'yazilar' end
$ rake routes
  yazilars GET    /yazilars(.:format)            {:action=>"index", :controller=>"yazilars"}
           POST   /yazilars(.:format)            {:action=>"create", :controller=>"yazilars"}
new_yazilar GET /yazilars/new(.:format) {:action=>"new", :controller=>"yazilars"}
   yazilar GET    /yazilars/:id(.:format)        {:action=>"show", :controller=>"yazilars"}
           PUT    /yazilars/:id(.:format)        {:action=>"update", :controller=>"yazilars"}
           DELETE /yazilars/:id(.:format)        {:action=>"destroy", :controller=>"yazilars"}
edit_yazilar GET /yazilars/:id/edit(.:format) {:action=>"edit", :controller=>"yazilars"}
Comments and changes to this ticket
- 
            
         phrewww January 16th, 2010 @ 06:05 PM- Assigned user set to josh
 
- 
            
         phrewww January 16th, 2010 @ 07:11 PMit seems that inflections are loaded after routes, so inflections are not correctly used. 
- 
            
         phrewww January 16th, 2010 @ 07:55 PMhere is the patch, to load initializers before routing, it needs tests Joshua, the tests are not included 
- 
            
         phrewww January 16th, 2010 @ 07:56 PM- Title changed from irregular inflection routes are not created correctly to [PATCH] load initializers before routing
 title update 
- 
         josh January 16th, 2010 @ 08:43 PM- Milestone cleared.
- State changed from new to open
 
- 
         Rizwan Reza January 16th, 2010 @ 09:28 PM- Tag set to 3.0, patch, review
 +1 Verified This patch applies cleanly. 
- 
         Matt Jones January 16th, 2010 @ 09:33 PMWas there a particular reason this behavior was changed in the rewrite of the initializer? It appears that initializers were before routes as of 2.3.5... 
- 
         Repository January 16th, 2010 @ 10:15 PM- State changed from open to resolved
 (from [603d4fbacd69d95987d3f7fed91631e481f5a1cf]) Build middleware stack and reload routes after app initializers run [#3709 state:resolved] http://github.com/rails/rails/commit/603d4fbacd69d95987d3f7fed91631... 
- 
         
- 
         Jeremy Kemper October 15th, 2010 @ 11:01 PM- Milestone set to 3.0.2
- Importance changed from  to Medium
 
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
Attachments
Referenced by
- 
         3709 
          [PATCH] load initializers before routing
        (from [603d4fbacd69d95987d3f7fed91631e481f5a1cf])
Build m... 3709 
          [PATCH] load initializers before routing
        (from [603d4fbacd69d95987d3f7fed91631e481f5a1cf])
Build m...