Skip to content

Commit

Permalink
Fix Time formatting deprecation warnings in Rails 7.0.0+, use time.to…
Browse files Browse the repository at this point in the history
…_fs instead of time.to_s; see https://apidock.com/rails/v7.0.0/Time/to_s
  • Loading branch information
gutschi committed Apr 23, 2024
1 parent dc2a8ce commit 299445d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/action_smser/delivery_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def self.create_from_sms(sms, to, sms_id)
def status=(stat, skip_log = false)
self[:status] = stat
self.status_updated_at = Time.now
add_log("#{Time.now.to_s(:db)}: #{stat}") unless skip_log
add_log("#{Time.now.to_fs(:db)}: #{stat}") unless skip_log
end

def add_log(str)
Expand Down
2 changes: 1 addition & 1 deletion app/views/action_smser/delivery_reports/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@


<h1>Delivery Reports Summary for
(<span style="font-size: smaller"><%= "#{time_span.first.to_s(:db)} => #{time_span.last.to_s(:db)}" %></span>)
(<span style="font-size: smaller"><%= "#{time_span.first.to_fs(:db)} => #{time_span.last.to_fs(:db)}" %></span>)
<%= "for #{params[:gateway]}" unless params[:gateway].blank? %>
</h1>

Expand Down

0 comments on commit 299445d

Please sign in to comment.