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

Ticket #9815: remove_inflector_route_reloading.diff

File remove_inflector_route_reloading.diff, 1.2 kB (added by zilkey, 4 months ago)

Removes the changes made in the previous patch

  • actionpack/test/controller/routing_test.rb

    old new  
    22382238      2.times { routes.reload! } 
    22392239    end 
    22402240 
    2241     def test_adding_inflections_forces_reload 
    2242       Inflector::Inflections.instance.expects(:uncountable).with('equipment') 
    2243       routes.expects(:reload!) 
    2244  
    2245       Inflector.inflections { |inflect| inflect.uncountable('equipment') } 
    2246     end 
    2247  
    22482241    private 
    22492242    def routes 
    22502243      ActionController::Routing::Routes 
  • actionpack/lib/action_controller/routing.rb

    old new  
    321321 
    322322    Routes = RouteSet.new 
    323323 
    324     ::Inflector.module_eval do 
    325       def inflections_with_route_reloading(&block) 
    326         returning(inflections_without_route_reloading(&block)) { 
    327           ActionController::Routing::Routes.reload! if block_given? 
    328         } 
    329       end 
    330  
    331       alias_method_chain :inflections, :route_reloading 
    332     end 
    333324  end 
    334325end