diff options
author | Nathan de Vries <nathan@atnan.com> | 2009-01-28 19:31:48 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-01-28 19:31:48 +0000 |
commit | 32eeb3e5211a4a7bfc7a1d0aa0cab1486bed3581 (patch) | |
tree | 541f742c2d89e8a90346723ea43d969a70c7c832 /actionpack/lib/action_controller | |
parent | 74871961eccdb455f18e8ef66716041f2f828ba8 (diff) | |
download | rails-32eeb3e5211a4a7bfc7a1d0aa0cab1486bed3581.tar.gz rails-32eeb3e5211a4a7bfc7a1d0aa0cab1486bed3581.tar.bz2 rails-32eeb3e5211a4a7bfc7a1d0aa0cab1486bed3581.zip |
Ensure that when UrlWriter is included in multiple classes, the default_url_options of one don't affect the other. [#1277 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/url_rewriter.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/url_rewriter.rb b/actionpack/lib/action_controller/url_rewriter.rb index d86e2db67d..bb6cb437b7 100644 --- a/actionpack/lib/action_controller/url_rewriter.rb +++ b/actionpack/lib/action_controller/url_rewriter.rb @@ -92,15 +92,12 @@ module ActionController # end # end module UrlWriter - # The default options for urls written by this writer. Typically a <tt>:host</tt> - # pair is provided. - mattr_accessor :default_url_options - self.default_url_options = {} - def self.included(base) #:nodoc: ActionController::Routing::Routes.install_helpers(base) base.mattr_accessor :default_url_options - base.default_url_options ||= default_url_options + + # The default options for urls written by this writer. Typically a <tt>:host</tt> pair is provided. + base.default_url_options ||= {} end # Generate a url based on the options provided, default_url_options and the |