diff options
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 0ca3a1279..b742dcc03 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -1383,6 +1383,15 @@ public end end + # The DateTime of the last InfoRequestEvent belonging to the InfoRequest + # Only available if the last_event_time attribute has been set. This is + # currentlt only set through .find_in_state + # + # Returns a DateTime + def last_event_time + attributes['last_event_time'].try(:to_datetime) + end + private def set_defaults |