diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-01-31 18:32:28 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-01 02:02:42 -0800 |
commit | e5ab4b0d07ade8d89d633ca744c0eafbc53ee921 (patch) | |
tree | aa2480b38f79e623b98da0274695f99db73bff20 /actionpack/lib/action_controller/metal/url_for.rb | |
parent | 8ae25a8e41168801590fdb95891cc5990b4db21c (diff) | |
download | rails-e5ab4b0d07ade8d89d633ca744c0eafbc53ee921.tar.gz rails-e5ab4b0d07ade8d89d633ca744c0eafbc53ee921.tar.bz2 rails-e5ab4b0d07ade8d89d633ca744c0eafbc53ee921.zip |
Convert to class_attribute
Diffstat (limited to 'actionpack/lib/action_controller/metal/url_for.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/url_for.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal/url_for.rb b/actionpack/lib/action_controller/metal/url_for.rb index 387e6a554b..51702368c1 100644 --- a/actionpack/lib/action_controller/metal/url_for.rb +++ b/actionpack/lib/action_controller/metal/url_for.rb @@ -1,3 +1,5 @@ +require 'active_support/core_ext/class/attribute' + module ActionController # In <b>routes.rb</b> one defines URL-to-controller mappings, but the reverse # is also possible: an URL can be generated from one of your routing definitions. @@ -85,9 +87,8 @@ module ActionController included do ActionController::Routing::Routes.install_helpers(self) - extlib_inheritable_accessor :default_url_options, - :instance_writer => false, :instance_reader => false - self.default_url_options ||= {} + class_attribute :default_url_options + self.default_url_options = {} end # Overwrite to implement a number of default options that all url_for-based methods will use. The default options should come in |