aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/persistence.rb
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2011-12-25 15:41:50 +0200
committerUģis Ozols <ugis.ozolss@gmail.com>2011-12-25 15:41:50 +0200
commit2d1cbd02b4600625dc5db6b70ab003127a8b5559 (patch)
tree8efdee937f1d490d01ba819c0a30601c82947851 /activerecord/lib/active_record/persistence.rb
parente4a1868bec4cae45fb18e441530639607cd169ac (diff)
downloadrails-2d1cbd02b4600625dc5db6b70ab003127a8b5559.tar.gz
rails-2d1cbd02b4600625dc5db6b70ab003127a8b5559.tar.bz2
rails-2d1cbd02b4600625dc5db6b70ab003127a8b5559.zip
Clarify what persisted? returns.
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r--activerecord/lib/active_record/persistence.rb4
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