diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-28 17:08:10 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-28 17:08:10 -0300 |
commit | 19d9fffb9b8350b03cf8b1e3a3249eba06d22c1a (patch) | |
tree | 84ec65547615e2562c7079faee84155d7f557a25 | |
parent | c8db1adc0d33228882d8d35d706a3744f7c3d958 (diff) | |
download | rails-19d9fffb9b8350b03cf8b1e3a3249eba06d22c1a.tar.gz rails-19d9fffb9b8350b03cf8b1e3a3249eba06d22c1a.tar.bz2 rails-19d9fffb9b8350b03cf8b1e3a3249eba06d22c1a.zip |
Use redefine_method instead define_method, it may be already defined.
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 66e6ecc74c..71a320ce9c 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -313,7 +313,7 @@ module ActionDispatch # Yes plz - JP included do routes.install_helpers(self) - singleton_class.send(:define_method, :_routes) { routes } + singleton_class.send(:redefine_method, :_routes) { routes } end define_method(:_routes) { @_routes ||= nil; @_routes || routes } |