diff options
author | Uģis Ozols <ugis.ozolss@gmail.com> | 2011-12-25 15:41:50 +0200 |
---|---|---|
committer | Uģis Ozols <ugis.ozolss@gmail.com> | 2011-12-25 15:41:50 +0200 |
commit | 2d1cbd02b4600625dc5db6b70ab003127a8b5559 (patch) | |
tree | 8efdee937f1d490d01ba819c0a30601c82947851 /activerecord/lib/active_record | |
parent | e4a1868bec4cae45fb18e441530639607cd169ac (diff) | |
download | rails-2d1cbd02b4600625dc5db6b70ab003127a8b5559.tar.gz rails-2d1cbd02b4600625dc5db6b70ab003127a8b5559.tar.bz2 rails-2d1cbd02b4600625dc5db6b70ab003127a8b5559.zip |
Clarify what persisted? returns.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index f468cdbefa..09ee2ba61d 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -59,8 +59,8 @@ module ActiveRecord @destroyed end - # Returns if the record is persisted, i.e. it's not a new record and it was - # not destroyed. + # Returns true if the record is persisted, i.e. it's not a new record and it was + # not destroyed, otherwise returns false. def persisted? !(new_record? || destroyed?) end |