Skip to content

Commit

Permalink
Removed unnecessary safe chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
schinery committed Dec 10, 2024
1 parent 6588e54 commit 00ce724
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/logga/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ def config_excluded_suffixes
end

def create_log_entry(entry)
log_receiver&.log_entries&.create(entry)
log_receiver.log_entries&.create(entry)
end

def creation_at
return Time.current unless log_receiver == self

(log_receiver&.log_entries&.order(:created_at)&.first&.created_at || Time.current) - 0.1.seconds
(log_receiver.log_entries.order(:created_at).first&.created_at || Time.current) - 0.1.seconds
end

def default_creation_log_body(record)
Expand Down

0 comments on commit 00ce724

Please sign in to comment.