Class: RailsErrorDashboard::ErrorComment

Inherits:
ErrorLogsRecord
  • Object
show all
Defined in:
app/models/rails_error_dashboard/error_comment.rb

Overview

Model: ErrorComment Represents a comment/note on an error for team collaboration

Instance Method Summary collapse

Instance Method Details

#formatted_timeObject

Get formatted timestamp for display



18
19
20
# File 'app/models/rails_error_dashboard/error_comment.rb', line 18

def formatted_time
  created_at.strftime("%b %d, %Y at %I:%M %p")
end

#recent?Boolean

Check if comment was created recently (within last hour)

Returns:

  • (Boolean)


23
24
25
# File 'app/models/rails_error_dashboard/error_comment.rb', line 23

def recent?
  created_at > 1.hour.ago
end