Permalink
Browse files

Prefix newly added method to avoid breakings people's apps.

See
378ce0e

Fixes #3921.
  • Loading branch information...
1 parent ad9a0e3 commit b7e45c3a816d943b0201bb5049d7dd12345e868d @jonleighton jonleighton committed Dec 18, 2011
@@ -1439,7 +1439,7 @@ def association_accessor_methods(reflection, association_proxy_class)
if association.nil? || force_reload
association = association_proxy_class.new(self, reflection)
- retval = force_reload ? reflection.klass.uncached { association.reload } : association.load
+ retval = force_reload ? reflection.klass.uncached { association.reload } : association._load
if retval.nil? and association_proxy_class == BelongsToAssociation
association_instance_set(reflection.name, nil)
return nil
@@ -113,15 +113,15 @@ def reset
end
# Loads the \target if not already loaded. Returns +self+ if the \target is present.
- def load
+ def _load
load_target unless loaded?
self unless @target.nil?
end
# Reloads the \target and returns +self+ on success.
def reload
reset
- load
+ _load
end
# Has the \target been already \loaded?

0 comments on commit b7e45c3

Please sign in to comment.