diff options
author | Ben Standefer <benstandefer@gmail.com> | 2016-06-01 12:03:30 -0700 |
---|---|---|
committer | Ben Standefer <benstandefer@gmail.com> | 2016-07-02 16:16:56 -0700 |
commit | ac156060a4dd81ea1f7730affb1491ceb3c973d0 (patch) | |
tree | 874a4b44ed7efbc1baffde1ec589b9ae88cebc67 /actioncable/lib | |
parent | 6a77398cc194070da00dc8e5bea773fa7b792444 (diff) | |
download | rails-ac156060a4dd81ea1f7730affb1491ceb3c973d0.tar.gz rails-ac156060a4dd81ea1f7730affb1491ceb3c973d0.tar.bz2 rails-ac156060a4dd81ea1f7730affb1491ceb3c973d0.zip |
Improve error message when record touch fails.
The current error message only indicates that a touch can fail because the record is new. In practice, we saw cases where touches were failing because the record had been destroyed. `persisted?` checks `new_record?` *and* `destroyed?`. It was confusing to get a message about a new record when in reality we were destroying records.
I also included a helpful tip for users to consider using `persisted?`, `new_record?`, or `destroyed?` before touching.
Diffstat (limited to 'actioncable/lib')
0 files changed, 0 insertions, 0 deletions