Ticket #9815: remove_inflector_route_reloading.diff
| File remove_inflector_route_reloading.diff, 1.2 kB (added by zilkey, 1 year ago) |
|---|
-
actionpack/test/controller/routing_test.rb
old new 2238 2238 2.times { routes.reload! } 2239 2239 end 2240 2240 2241 def test_adding_inflections_forces_reload2242 Inflector::Inflections.instance.expects(:uncountable).with('equipment')2243 routes.expects(:reload!)2244 2245 Inflector.inflections { |inflect| inflect.uncountable('equipment') }2246 end2247 2248 2241 private 2249 2242 def routes 2250 2243 ActionController::Routing::Routes -
actionpack/lib/action_controller/routing.rb
old new 321 321 322 322 Routes = RouteSet.new 323 323 324 ::Inflector.module_eval do325 def inflections_with_route_reloading(&block)326 returning(inflections_without_route_reloading(&block)) {327 ActionController::Routing::Routes.reload! if block_given?328 }329 end330 331 alias_method_chain :inflections, :route_reloading332 end333 324 end 334 325 end