diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-11 18:16:47 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-11 18:16:47 -0800 |
commit | acd4bfb53764cfea0feaa367cfc8d00dbf9a87c3 (patch) | |
tree | d59f4ded7a6650006d82ac8a98677e85548e0340 /actionpack/lib/action_dispatch/routing | |
parent | 89c5b9aee7d7db95cec9e5a934c3761872ab107e (diff) | |
download | rails-acd4bfb53764cfea0feaa367cfc8d00dbf9a87c3.tar.gz rails-acd4bfb53764cfea0feaa367cfc8d00dbf9a87c3.tar.bz2 rails-acd4bfb53764cfea0feaa367cfc8d00dbf9a87c3.zip |
Just define methods directly on the class rather than use the module
indirection.
clever--
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 756a21dcac..f67708722b 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -243,10 +243,6 @@ module ActionDispatch end module Base - def initialize(set) #:nodoc: - @set = set - end - # You can specify what Rails should route "/" to with the root method: # # root :to => 'pages#main' @@ -558,11 +554,6 @@ module ActionDispatch # PUT /admin/posts/1 # DELETE /admin/posts/1 module Scoping - def initialize(*args) #:nodoc: - @scope = {} - super - end - # Scopes a set of routes to the given default options. # # Take the following route definition as an example: @@ -956,11 +947,6 @@ module ActionDispatch alias :nested_scope :path end - def initialize(*args) #:nodoc: - super - @scope[:path_names] = @set.resources_path_names - end - def resources_path_names(options) @scope[:path_names].merge!(options) end @@ -1473,6 +1459,11 @@ module ActionDispatch end end + def initialize(set) #:nodoc: + @set = set + @scope = { :path_names => @set.resources_path_names } + end + include Base include HttpHelpers include Redirection |