Merge pull request #984 from evmorov/master
Fixes uninitialized constant PaperTrail::RecordTrail::ActiveRecordError
This commit is contained in:
commit
839d8c7af4
|
@ -17,6 +17,8 @@ recommendations of [keepachangelog.com](http://keepachangelog.com/).
|
|||
|
||||
- Stop including unnecessary files in released gem. Reduces .gem file size
|
||||
from 100K to 30K.
|
||||
- [#984](https://github.com/airblade/paper_trail/pull/984) - Fix wrong
|
||||
exception in `touch_with_version` if record object isn't persisted
|
||||
|
||||
## 7.1.0 (2017-07-09)
|
||||
|
||||
|
|
|
@ -399,7 +399,7 @@ module PaperTrail
|
|||
# leverage an `after_update` callback anyways (likely for v4.0.0)
|
||||
def touch_with_version(name = nil)
|
||||
unless @record.persisted?
|
||||
raise ActiveRecordError, "can not touch on a new record object"
|
||||
raise ::ActiveRecord::ActiveRecordError, "can not touch on a new record object"
|
||||
end
|
||||
attributes = @record.send :timestamp_attributes_for_update_in_model
|
||||
attributes << name if name
|
||||
|
|
Loading…
Reference in New Issue