GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of lifo/doc-rails
Description: Repository for improving Rails documentation
Homepage: http://www.rubyonrails.org
Clone URL: git://github.com/zmalltalker/doc-rails.git
documented load_target in association_proxy.rb
Xavier Noria (author)
Sun Apr 06 09:06:25 -0700 2008
commit  2faa4019a523bc57f48c37c6c9daab09df37dbb1
tree    c037f68daffdeb5d6ce9b8f7f000f01805a635bb
parent  3dc5028c6519950c99db0973bfd14e89c2dc9fcb
...
179
180
181
 
 
 
 
 
 
 
 
 
 
182
183
184
...
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
0
@@ -179,6 +179,16 @@ module ActiveRecord
0
           end
0
         end
0
 
0
+ # Loads the target if needed and returns it.
0
+ #
0
+ # This method is abstract in the sense that it relies on +find_target+,
0
+ # which is expected to be provided by descendants.
0
+ #
0
+ # If the target is already loaded it is just returned. Thus, you can call
0
+ # +load_target+ unconditionally to get the target.
0
+ #
0
+ # ActiveRecord::RecordNotFound is rescued within the method, and it is
0
+ # not reraised. The proxy is reset and +nil+ is the return value.
0
         def load_target
0
           return nil unless defined?(@loaded)
0
 

Comments

    No one has commented yet.