Permalink
Browse files

The instance_reader of default_url_options needs to not exist.

  • Loading branch information...
Yehuda Katz Yehuda Katz
Yehuda Katz authored and Yehuda Katz committed Feb 27, 2010
1 parent 3f0ed20 commit 8247bd9d3e1c2772f2f1e0e7ee30ff7f19ddd0de
Showing with 1 addition and 0 deletions.
  1. +1 −0 actionpack/lib/action_dispatch/routing/url_for.rb
@@ -90,6 +90,7 @@ module UrlFor
class_attribute :default_url_options
else
mattr_accessor :default_url_options
+ remove_method :default_url_options
end
self.default_url_options = {}

2 comments on commit 8247bd9

@nertzy

This comment has been minimized.

Show comment Hide comment
@nertzy

nertzy Mar 1, 2010

Contributor

Shouldn't this be a mattr_writer instead? No need to define the getter and then immediately remove it.

Contributor

nertzy replied Mar 1, 2010

Shouldn't this be a mattr_writer instead? No need to define the getter and then immediately remove it.

@carllerche

This comment has been minimized.

Show comment Hide comment
@carllerche

carllerche Mar 1, 2010

Contributor

It removes the instance method. The class reader is still needed.

Contributor

carllerche replied Mar 1, 2010

It removes the instance method. The class reader is still needed.

Please sign in to comment.