diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-08-17 19:46:32 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-08-17 19:46:32 -0300 |
commit | 4b339f44bdaa307004db2345ac9c950d9f508814 (patch) | |
tree | 855748bc8f1df1a8b1d327810be229af05ee522e /actionpack/lib/action_controller | |
parent | c01c8967a02537f132d437d5ae15332982119651 (diff) | |
parent | 25e5b0c4a8d0045715a6ad11e2898585826e4e9b (diff) | |
download | rails-4b339f44bdaa307004db2345ac9c950d9f508814.tar.gz rails-4b339f44bdaa307004db2345ac9c950d9f508814.tar.bz2 rails-4b339f44bdaa307004db2345ac9c950d9f508814.zip |
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/routing/route_set.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/routing/route_set.rb b/actionpack/lib/action_controller/routing/route_set.rb index a4f54ad662..25fdbf480e 100644 --- a/actionpack/lib/action_controller/routing/route_set.rb +++ b/actionpack/lib/action_controller/routing/route_set.rb @@ -213,7 +213,7 @@ module ActionController self.routes = [] self.named_routes = NamedRouteCollection.new - clear_recognize_optimized! + clear! end # Subclasses and plugins may override this method to specify a different @@ -223,6 +223,7 @@ module ActionController end def draw + clear! yield Mapper.new(self) install_helpers end @@ -230,8 +231,10 @@ module ActionController def clear! routes.clear named_routes.clear + @combined_regexp = nil @routes_by_controller = nil + # This will force routing/recognition_optimization.rb # to refresh optimisations. clear_recognize_optimized! @@ -262,7 +265,6 @@ module ActionController def load! Routing.use_controllers!(nil) # Clear the controller cache so we may discover new ones - clear! load_routes! end @@ -286,10 +288,12 @@ module ActionController configuration_files.each { |config| load(config) } @routes_last_modified = routes_changed_at else - add_route ":controller/:action/:id" + draw do |map| + map.connect ":controller/:action/:id" + end end end - + def routes_changed_at routes_changed_at = nil |