This project is archived and is in readonly mode.

#1083 ✓resolved
Adam Milligan

Calls to private methods via association proxies should act consistently with Ruby method dispatch

Reported by Adam Milligan | September 21st, 2008 @ 01:13 AM

From core discussion thread http://groups.google.com/group/r...

The problem in a nutshell:

class Fork < ActiveRecord::Base has_many :tines

private def stab_stab_stab

...

end end

class Tine < ActiveRecord::Base belongs_to :fork end

fork.stab_stab_stab # NoMethodError tine.fork.stab_stab_stab # no exception

With this patch, calls to private methods will act consistently when called on association proxies (including when called with #send).

Tests included.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages