diff options
author | Xavier Noria <fxn@hashref.com> | 2010-12-24 01:55:35 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-12-24 01:55:35 +0100 |
commit | 8cdb75808198bf579e14d0fcdd1d2a51b3233add (patch) | |
tree | 9bf4bb54e4175bc805d407e2b5e3bc42bf1d0dd8 /activerecord/lib/active_record/associations/association_proxy.rb | |
parent | 3822673151cd0f53e0e4e671988e35603bf2901c (diff) | |
parent | 6974c595fd480dc0ae3311ef60920fa87c5ff9d0 (diff) | |
download | rails-8cdb75808198bf579e14d0fcdd1d2a51b3233add.tar.gz rails-8cdb75808198bf579e14d0fcdd1d2a51b3233add.tar.bz2 rails-8cdb75808198bf579e14d0fcdd1d2a51b3233add.zip |
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'activerecord/lib/active_record/associations/association_proxy.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/association_proxy.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index 252ff7e7ea..f4eceeed8c 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -130,6 +130,16 @@ module ActiveRecord @loaded = true end + # The target is stale if the target no longer points to the record(s) that the + # relevant foreign_key(s) refers to. If stale, the association accessor method + # on the owner will reload the target. It's up to subclasses to implement this + # method if relevant. + # + # Note that if the target has not been loaded, it is not considered stale. + def stale_target? + false + end + # Returns the target of this proxy, same as +proxy_target+. def target @target |