Skip to content

Commit

Permalink
Not calling a private method anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed Oct 7, 2009
1 parent e57197a commit 3916f03
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions actionpack/lib/action_view/base.rb
Expand Up @@ -237,8 +237,11 @@ def self.for_controller(controller)
if controller.class.respond_to?(:_helper_serial)
klass = @views[controller.class._helper_serial] ||= Class.new(self) do
name = controller.class.name.gsub(/::/, '__')
Subclasses.remove_const(name) if Subclasses.const_defined?(name)
Subclasses.const_set(name, self)

Subclasses.class_eval do
remove_const(name) if const_defined?(name)
const_set(name, self)
end

if controller.respond_to?(:_helpers)
include controller._helpers
Expand Down

2 comments on commit 3916f03

@ender672
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ender672
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.