-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Jun 15, 2008, at 12:37 PM, Greg Hauptmann wrote:

> (complete email)Hi,
>
> Why can't an instance instantiated within a class method access a  
> protected
> instance method?
>
> e.g.
>
> class Recurring < ActiveRecord::Base
>
> def self.reconcile rs = Recurring.find(:all)
> rs.each do |r|
> r.reconcile_one
> end
>  end
>
>  protected
>
>  def reconcile_one
>     # do something
>  end
>
> end

Because calling a Method with an explicit receiver is like "calling  
from the outside".

Regards,
Florian Gilcher
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkhVCkAACgkQJA/zY0IIRZafKQCghgHXBhTmfp3eCYVWTbQempIp
EwcAoJqNwn9FkHgTZjt9/jc14+PeD0A5
=nITW
-----END PGP SIGNATURE-----