mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Tidy up valid conditions in router a bit.
This commit is contained in:
parent
02a1a4edc8
commit
6dfa8d8e95
1 changed files with 4 additions and 2 deletions
|
@ -201,9 +201,11 @@ module ActionDispatch
|
|||
self.resources_path_names = self.class.default_resources_path_names.dup
|
||||
self.controller_namespaces = Set.new
|
||||
self.default_url_options = {}
|
||||
|
||||
self.request_class = request_class
|
||||
self.valid_conditions = request_class.public_instance_methods.select{ |m| m != "id" }.map{ |m| m.to_sym }
|
||||
self.valid_conditions += [:controller, :action]
|
||||
self.valid_conditions = request_class.public_instance_methods.map { |m| m.to_sym }
|
||||
self.valid_conditions.delete(:id)
|
||||
self.valid_conditions.push(:controller, :action)
|
||||
|
||||
@disable_clear_and_finalize = false
|
||||
clear!
|
||||
|
|
Loading…
Reference in a new issue