Skip to content
This repository
Browse code

Not calling a private method anymore

  • Loading branch information...
commit 3916f0340e8714d36a64162be793192849a9e51f 1 parent e57197a
Yehuda Katz authored October 07, 2009

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. 7  actionpack/lib/action_view/base.rb
7  actionpack/lib/action_view/base.rb
@@ -237,8 +237,11 @@ def self.for_controller(controller)
237 237
       if controller.class.respond_to?(:_helper_serial)
238 238
         klass = @views[controller.class._helper_serial] ||= Class.new(self) do
239 239
           name = controller.class.name.gsub(/::/, '__')
240  
-          Subclasses.remove_const(name) if Subclasses.const_defined?(name)
241  
-          Subclasses.const_set(name, self)
  240
+
  241
+          Subclasses.class_eval do
  242
+            remove_const(name) if const_defined?(name)
  243
+            const_set(name, self)
  244
+          end
242 245
 
243 246
           if controller.respond_to?(:_helpers)
244 247
             include controller._helpers

2 notes on commit 3916f03

Timothy Elliott

Works fine for me in 1.8.6, but I get the following in 1.9.1:
http://gist.github.com/204326

This is after setting up a new rails project with:
$ rails test; cd test
$ script/generate scaffold static_page
$ script/server
=> Booting WEBrick
=> Rails 3.0.pre application starting on http://0.0.0.0:3000}
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2009-10-07 12:22:18] INFO WEBrick 1.3.1
[2009-10-07 12:22:18] INFO ruby 1.9.1 (2009-07-16) [x86_64-linux]
[2009-10-07 12:22:18] WARN TCPServer Error: Address already in use - bind(2)
[2009-10-07 12:22:18] INFO WEBrick::HTTPServer#start: pid=3524 port=3000

Timothy Elliott

Works fine for me in 1.8.6, but I get the following in 1.9.1:
http://gist.github.com/204326

This is after setting up a new rails project with:
$ rails test; cd test
$ script/generate scaffold static_page
$ script/server
=> Booting WEBrick
=> Rails 3.0.pre application starting on http://0.0.0.0:3000}
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2009-10-07 12:22:18] INFO WEBrick 1.3.1
[2009-10-07 12:22:18] INFO ruby 1.9.1 (2009-07-16) [x86_64-linux]
[2009-10-07 12:22:18] WARN TCPServer Error: Address already in use - bind(2)
[2009-10-07 12:22:18] INFO WEBrick::HTTPServer#start: pid=3524 port=3000

Please sign in to comment.
Something went wrong with that request. Please try again.